Attackers use Compression Ratio Info-leak Made Easy, or CRIME, to recover secret data by measuring how compression changes encrypted traffic size. If a chosen input causes more compression when it matches hidden content, repeated probing can reveal tokens, session values, or other sensitive strings. Defenders disable compression where possible.
How CRIME turns compression into a side channel
CRIME works by exploiting a mismatch between what is hidden and what is compressed. If the attacker can inject chosen text into a request or message that also contains a secret, matching characters make the compressed payload slightly smaller. Repeating that probe many times lets the attacker infer the secret one byte, or small group of bytes, at a time.
The technique is not about breaking encryption directly. It abuses the fact that compression happens before encryption, so the encrypted traffic still leaks information through its length. That makes the attack especially effective when a secret such as a token, cookie, or session value is reflected alongside attacker-controlled input.
Where the leakage comes from in practice
CRIME depends on a readable relationship between attacker input and protected content. The attacker does not need to see plaintext, only to influence a request enough that the compressor can benefit from repeated strings. When the guess is closer to the secret, the compressed record shrinks, giving a measurable signal.
The best targets are secrets that are stable across many requests and appear in the same compression context as attacker-supplied text. That is why session cookies, anti-CSRF material, authorization tokens, and similar values are attractive. The same basic idea can appear in other compression side channels, but the practical requirement is always the same: controlled input plus secret-dependent size differences.
Because the signal is tiny, attackers usually need many samples and careful statistical comparison. Small noise from normal traffic does not prevent exploitation if the attacker can repeat the request pattern enough times and keep the oracle conditions stable.
How to stop or limit the attack surface
The cleanest defense is to disable compression wherever secrets and attacker-controlled data can share the same compression context. If compression is operationally necessary, isolate secrets from compressible attacker input so that the compressor cannot create a useful comparison signal.
Modern defenders also reduce exposure by minimizing secret reuse, shortening secret lifetime, and preferring designs that avoid reflecting sensitive material in responses. Even when the original CRIME condition is removed, adjacent side channels can still exist if a different layer compresses mixed-trust data.
For teams that rely on TLS, the operational takeaway is to review whether compression is enabled at the protocol, proxy, or application layer, not just in the browser or server default. A narrow configuration change is only effective if every component in the path stops combining secrets with attacker-controlled text.
Risk and Threat Considerations
CRIME is dangerous because it can convert a passive-looking traffic feature into a secret-recovery oracle. The exposure is highest when the same request carries both a secret and attacker influence, since the attacker can iterate until compression differences become readable.
Failure mechanism: Compression amplifies repeated substrings, so the size of encrypted traffic leaks whether attacker input matches hidden secret material closely enough to help the compressor.
Impact: An attacker can recover session data or other sensitive strings and then reuse them for impersonation, account access, or follow-on attacks against the protected application.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST SP 800-53 Rev 5 and CIS Controls v8 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | SC-28 — Protection of Information at Rest | Compression side channels leak protected data through handling of secrets. |
| SC-8 — Transmission Confidentiality and Integrity | CRIME exploits leakage in encrypted transit, not encryption failure. | |
| Recommendation — Minimize secret exposure in compressed or shared-data paths. Protect transit and avoid mechanisms that leak metadata through encryption wrappers. | ||
| ISO/IEC 27001:2022 | A.8.24 — Use of Cryptography | The issue concerns cryptographic deployment choices and their side effects. |
| Recommendation — Review crypto-enabled transports for compression side channels. | ||
| CIS Controls v8 | CIS-3 — Data Protection | The attack can expose sensitive strings carried in application traffic. |
| Recommendation — Restrict sensitive data exposure in application and transport flows. | ||
Practitioner Guidance
What to verify: Confirm whether any proxy, application server, or TLS stack still compresses data that contains both secrets and user-influenced text. The important test is not whether encryption is strong, but whether the same compression context can see both kinds of content.
Decision rule: If compression is applied before secrets are isolated from attacker input, treat the configuration as high risk and remove compression first, then revisit whether any optimization is still justified.
Common mistake: Teams often disable one compression setting and assume the issue is gone, while another layer still performs compression on mixed content. The practical fix is to check the whole delivery path, not a single component.
Practitioner takeaway: CRIME is a length-based secret disclosure problem, so the real control objective is to prevent attacker-controlled text and sensitive values from being compressed together at any layer.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 20, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org