Padding Oracle Attack
Decrypting ciphertext by abusing leaked padding-validity errors.
What it is
An attack against certain block-cipher modes (notably CBC without integrity protection) in which the system reveals whether a decrypted message's padding is valid. An attacker uses that single bit of feedback to recover plaintext one byte at a time, without the key.
Why it matters
It is a textbook example of why encryption alone is not enough and why authenticated encryption matters. Distinguishable error responses or timing can fully break confidentiality. It has compromised real-world TLS and web frameworks.
In practice
An attacker recovering a session cookie's plaintext by submitting modified ciphertexts and watching which ones return a padding error.
What to look for
- Different errors or timing for bad padding versus bad data.
- Many requests with slightly changed ciphertext to one endpoint.
- CBC mode without a MAC checked first.
Common mistake
Returning helpful error messages. A single different response for bad padding is enough to decrypt data.
Practice it nearby
CyberKit has no tool for this term itself. These are the closest places to practice it.
- Decoder
Paste any opaque value. It names what it looks like and why, then decodes it: Base64 and other layers, number bases, hashes, JWTs, certificates, SIDs, User-Agents and MAC addresses.
- Decode Range
Name an opaque value before you read it: timestamps, encodings and hashes, all generated by the site's own converters.
In the field
Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.
-
Burp Suite Commercial
An intercepting proxy for testing web apps by hand and with its scanner.
-
ZAP Open source
An open source web app scanner and proxy, often run in CI pipelines.
-
Cloudflare WAF Commercial
Blocks common web attacks at the edge while the code gets fixed.
Read next
- Block Cipher Mode of Operation: The scheme that lets a block cipher encrypt data longer than one block.
- Authenticated Encryption: Encryption that guarantees both confidentiality and integrity at once.
- Block Cipher: A symmetric cipher that encrypts data in fixed-size blocks.