CyberKit

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.

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

Sources