Cybersecurity glossary

What is CRIME?

Learn what the CRIME attack is, how TLS and SPDY compression leaked HTTPS cookies via size side channels, who was affected, and why disabling TLS compression remains standard practice.

Cryptography and TLSUpdated August 11, 2026
Also known asCRIME attackCompression Ratio Info-leak Made EasyTLS compression CRIME attack

Definition

CRIME (Compression Ratio Info-leak Made Easy) is a compression side-channel attack against HTTPS that recovers secret values such as session cookies by injecting attacker-controlled data into requests that are compressed together with those secrets, then observing resulting TLS ciphertext lengths.

Why CRIME mattered

In 2012, Juliano Rizzo and Thai Duong publicly demonstrated that optional TLS compression—a feature meant to save bandwidth—could undermine HTTPS confidentiality. They called the attack CRIME: Compression Ratio Info-leak Made Easy.

Web sessions depended on cookies riding inside encrypted requests. CRIME showed that if those requests were compressed together with attacker-controlled path or query data, a network observer could recover cookie bytes by measuring ciphertext sizes. The industry response was swift: browsers and servers disabled TLS compression, and “turn off TLS compression” became baseline hardening advice.

What CRIME actually is

CRIME is a chosen-input compression oracle against encrypted HTTP requests. Compression algorithms exploit repeated strings. If the attacker can place a guess next to a secret cookie value inside the same compressed input, a correct guess increases redundancy and shrinks the compressed output. TLS still encrypts the result, but encryption does not hide the new length.

Vulnerable feature

TLS-level compression (and related SPDY header compression behaviors in that era).

Secret at risk

HTTP cookies and other request headers compressed alongside attacker-influenced fields.

Oracle signal

Smaller TLS ciphertext indicates a better match between guess and secret.

Required vantage

Ability to trigger many victim requests and observe encrypted sizes on the wire.

How the CRIME attack works

The exploit loop is experimental and repetitive rather than a single malformed handshake.

1

Confirm compression is active

The victim’s TLS stack negotiates a compression method other than null, or an equivalent request-header compression path is in play.

2

Induce reflected guesses

Malicious content causes the browser to send requests whose URL or body includes attacker-chosen probe strings.

3

Co-locate probes with cookies

Compression operates over input that includes both the Cookie header and the attacker’s probe material.

4

Compare ciphertext lengths

Across trials, correct cookie-byte guesses produce shorter compressed—and thus shorter encrypted—requests.

5

Recover and replay the cookie

Once reconstructed, the session cookie can be replayed to impersonate the user on the target site.

Same-origin rules, request formatting, and noise complicate real-world exploitation, but the cryptographic lesson was unambiguous: compression and secrecy collide when lengths remain visible.

CRIME, BREACH, and TIME in context

CRIME opened a series of web compression-oracle discussions. Later work moved the problem when TLS compression disappeared.

PropertyCRIMEBREACHBEAST
Layer of weaknessTLS/SPDY compressionHTTP response compressionTLS 1.0 CBC IV design
Input the attacker influencesRequest path/query (with cookies)Reflected response contentChosen plaintext blocks
Primary secretSession cookiesCSRF tokens / response secretsCookies via CBC byte recovery
Industry knee-jerk fixDisable TLS compressionApp-level compression hygieneRecord splitting / TLS upgrade
Still a config checklist item?Yes—verify compression stays offYes—HTTP gzip/Brotli reviewYes—no TLS 1.0

Who was affected

Any browser and server pair that negotiated TLS compression for HTTPS was potentially in scope at disclosure. High-value web applications—webmail, banking, admin consoles—were the practical targets because cookie theft equaled account takeover.

Infrastructure teams also had to inspect load balancers and older TLS terminators that might still advertise compression even after browser vendors shipped disables. A single compressing intermediary could reintroduce risk for otherwise hardened origins.

Historical mitigations

The durable fix for classic CRIME was operationally simple and cryptographically sound.

Disable TLS compression

Negotiate only the null compression method. Major clients and servers made this the default after disclosure.

Patch browsers and libraries

Vendors removed or ignored non-null TLS compression to eliminate the request-side oracle.

Revisit SPDY/HTTP2 assumptions

Later header compression designs and deployments treated CRIME-style threats as first-class constraints.

Defend cookies elsewhere

HttpOnly, Secure, SameSite, and short session lifetimes reduce impact if other oracles appear.

Disabling TLS compression did not end all compression side channels—BREACH proved HTTP-level gzip could still leak—but it closed the specific CRIME path.

What practitioners should do today

  • Verify TLS terminators advertise no compression methods other than null (test with SSL/TLS scanners and config audits).
  • Confirm CDNs, API gateways, and legacy appliances have not re-enabled TLS compression for ‘performance’.
  • Keep browser and TLS library fleets patched; reject ancient stacks that still offer compression.
  • Separately review HTTP-level compression for BREACH-style risk on responses that embed secrets.
  • Use Secure, HttpOnly, and SameSite cookie attributes to limit cookie theft impact across attack classes.
  • Prefer TLS 1.2+ or TLS 1.3 configurations aligned with current NIST and browser baseline guidance.
  • Include compression settings in change-management reviews whenever performance teams tune edge proxies.
  • Document that encrypted traffic still leaks size—do not treat HTTPS as hiding compression ratios.

Lessons CRIME left for TLS operations

CRIME taught that optional performance features can become confidentiality bugs. Compression is beneficial on cleartext files; on secret-bearing authenticated traffic, it creates adaptive oracles unless lengths are hidden or secrets are isolated.

It also illustrated rapid ecosystem learning. Once a browser-visible demo existed, vendors could disable a rarely essential feature faster than they could redeploy every website. Protocol optionality that almost nobody needs is a liability when it expands the attack surface.

The practical takeaway

CRIME recovered HTTPS cookies by exploiting TLS/SPDY compression and ciphertext length leakage. The lasting operational rule is simple: keep TLS compression off, monitor intermediaries for regressions, and remember that related oracles can still exist at the HTTP layer even when classic CRIME is gone.

Related security terms

Frequently asked questions

What is CRIME in simple terms?

CRIME steals HTTPS cookies by watching how much a compressed request shrinks. When a guess matches part of the cookie, compression works better and the encrypted request gets smaller.

What does CRIME stand for?

Compression Ratio Info-leak Made Easy.

Does CRIME decrypt TLS?

No. It uses length leakage from compression. The cipher can be correct and modern while sizes still reveal whether a guess matched.

How is CRIME different from BREACH?

CRIME focuses on request-side TLS or SPDY compression with cookies. BREACH focuses on HTTP response compression with secrets like CSRF tokens inside pages.

Is TLS compression still used?

It should not be. Major browsers and servers disabled TLS-level compression after CRIME. Operators should verify intermediaries have not re-enabled it.

Could SPDY be affected?

Yes. SPDY’s compression of HTTP headers was part of the CRIME-era risk discussion, which influenced how later HTTP/2 header compression was designed and deployed more carefully.

What is the lasting mitigation?

Keep TLS compression disabled, avoid compressing attacker-influenced data with secrets, and assume encrypted length remains visible to network observers.

References

Explore authoritative guidance and frameworks related to crime.

Explore every security definition

Return to the glossary to search by term, alias, starting letter, or security category.

Browse glossary