Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Are the CRIME and BREACH Attacks?

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.

Illustration for the cybersecurity term CRIME and BREACH
Home / Blog / Cybersecurity Terms / What Are the CRIME and BREACH Attacks?
17 November 2026

What Are the CRIME and BREACH Attacks?

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.

The Shared Idea

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.

How the Two Differ

CRIMEBREACH
Layer attackedTLS-level compression, and SPDY header compressionHTTP-level response compression, typically gzip
Secret recoveredCookies and other request headersAnything reflected in the response body, usually CSRF tokens
DirectionClient to serverServer to client
Status todayResolved; TLS compression is disabled everywhere and removed in TLS 1.3Still 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.

What an Attacker Needs for BREACH

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.

Mitigations That Work

Note that referer checking and SameSite cookies help, since the requests originate cross-site, but they are not complete answers on their own.

Why They Still Appear in Reports

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.

FAQ – Frequently Asked Questions

Is BREACH Still a Real Risk?

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.

Should I Disable gzip to Prevent BREACH?

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.

What Is the Difference Between CRIME and BREACH?

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.

Does TLS 1.3 Prevent These Attacks?

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.

Related Terms

You May Be Interested In These

What Is a BYOVD Attack?

Cybersecurity Terms

17 November 2026

What Is a BYOVD Attack?

Read More
What Is the SOC Maturity Model?

Cybersecurity Terms

17 November 2026

What Is the SOC Maturity Model?

Read More