A Solution to Compression Oracles on the Web
Mar 27, 2018Guest Author

Summary
Developed and open-sourced cf-nocompress, a proof-of-concept NGINX plugin with a modified gzip module to mitigate compression oracle attacks (CRIME, BREACH, TIME, HEIST) by selectively compressing non-secret parts of web pages. The solution uses sregex to identify secrets via regular expressions and disables compression for them, preventing their inclusion in the compression dictionary. This approach aims to transparently protect sensitive information like CSRF tokens without requiring application modification or client-side JavaScript.
More from the Website Security & Threat Management trail
- We tested our own WAF with frontier AI models. Here’s what we found
- When scanners miss the attack: how Cloudflare Client-Side Security protects storefronts
- Introducing automatic remediation policies with Cloudflare CASB
- Introducing context-aware vulnerability discovery and remediation with Cloudflare Managed Defense and OpenAI Daybreak Models
- Introducing Adaptive Intelligence: undermining the economics of every bot attack