Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
CRIME and BREACH recover secrets from encrypted traffic by measuring how well it compresses. One attacks TLS compression, the other HTTP response compression, which is still widely enabled.

What Are the CRIME and BREACH Attacks?
CRIME and BREACH are compression side-channel attacks. Neither breaks the cipher. Both exploit the fact that compression makes repeated data smaller, so an attacker who can inject text into a message and watch the length of the encrypted result can tell whether their guess matched a secret already in that message.
CRIME — Compression Ratio Info-leak Made Easy — was presented by Juliano Rizzo and Thai Duong at ekoparty in September 2012 and tracked as CVE-2012-4929. BREACH — Browser Reconnaissance and Exfiltration via Adaptive Compression of Hypertext — followed at Black Hat USA in August 2013, presented by Angelo Prado, Neal Harris, and Yoel Gluck, and tracked as CVE-2013-3587.
Suppose a message contains a secret token, token=7a3f…, and the attacker can also influence part of the same message. The attacker inserts token=0, then token=1, and so on. When the injected string matches the start of the real token, the compressor recognises a repeated sequence and emits a shorter output. Encryption preserves that length difference. Comparing sizes across guesses reveals the secret one character at a time, in roughly linear rather than exponential effort.
| CRIME | BREACH | |
|---|---|---|
| Layer attacked | TLS-level compression, and SPDY header compression | HTTP-level response compression, typically gzip |
| Secret recovered | Cookies and other request headers | Anything reflected in the response body, usually CSRF tokens |
| Direction | Client to server | Server to client |
| Status today | Resolved; TLS compression is disabled everywhere and removed in TLS 1.3 | Still applicable, because response compression remains standard and desirable |
That last row is the point most summaries miss. CRIME was fixed by turning off a feature almost nobody used. BREACH cannot be fixed the same way, because disabling HTTP compression across a site is a substantial performance and bandwidth cost that few organisations will accept.
Three conditions have to hold at once:
The attacker also needs to observe the victim’s encrypted traffic and to make the victim’s browser issue the requests, usually through a malicious page in another tab. Fewer pages meet all three conditions than people assume, but login forms, account settings pages, and search results with embedded tokens frequently do.
Note that referer checking and SameSite cookies help, since the requests originate cross-site, but they are not complete answers on their own.
Penetration test reports and scanner output still carry BREACH findings, and the right response is to check the three conditions rather than to file a change request disabling gzip. If the framework masks tokens per response, the finding is informational. If the application reflects user input into a page that also contains a long-lived secret, it is real and worth fixing properly.
Both attacks belong to the same family as BEAST, FREAK, and POODLE: a decade of research that treated TLS as a system rather than a cipher, and that shaped the design of TLS 1.3.
We assess compression side channels alongside the rest of the transport and session layer in our web application security services.
It can be, where a compressed response reflects attacker-controlled input and also contains a secret such as a CSRF token. Many modern frameworks mask tokens per response, which defeats it, so the finding is often informational. Check the specific conditions rather than treating every scanner report as exploitable or dismissing it outright.
Only for the specific responses that contain secrets, if at all. Disabling compression site-wide costs bandwidth and page performance for every user, and better options exist: separate secrets from reflected input, mask tokens with a per-response random value, and rotate tokens. Most teams get a complete fix from the framework-level masking they already have available.
CRIME attacks compression applied by TLS itself, or by SPDY headers, and recovers data from requests such as cookies. BREACH attacks compression applied by the web server to HTTP response bodies and recovers data reflected in those bodies, typically CSRF tokens. CRIME was fixed by disabling TLS compression; BREACH persists because HTTP compression remains in general use.
TLS 1.3 removed protocol-level compression, so CRIME is not possible against it. BREACH is unaffected, because the compression happens at the HTTP layer above TLS and TLS 1.3 encrypts it faithfully. Upgrading the protocol version is worth doing for many reasons, but it is not a mitigation for response-body compression side channels.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.