← Back to Table of Contents

Heartbleed, POODLE, BEAST, and CRIME

TLS has had some spectacular failures. Not because the protocol design was wrong, but because implementations had bugs and older protocol features had subtle weaknesses. Understanding these failures teaches you why TLS 1.3 removed so many features.

Heartbleed (2014)

Not a protocol flaw but an implementation bug in OpenSSL. The TLS Heartbeat extension lets one side send a small message and get an echo back (a keep-alive mechanism). The message includes a length field.

The bug: OpenSSL trusted the length field without checking it against the actual message size. An attacker could send a 1-byte message but claim it was 64KB. OpenSSL would echo back 64KB of memory, which could contain private keys, session keys, passwords, and other sensitive data.

Impact: catastrophic. Any server running the vulnerable OpenSSL version was leaking memory contents to anyone who asked. Private keys were extracted from live servers within hours of the disclosure.

Lesson: the Heartbeat extension was unnecessary complexity. TLS 1.3 doesn’t include it.

BEAST (2011)

BEAST exploited a weakness in CBC mode in TLS 1.0. In TLS 1.0, the IV (initialization vector) for each CBC record was the last ciphertext block of the previous record. This made the IV predictable, allowing a chosen-plaintext attack.

The attacker needed to inject content into the encrypted stream (possible via JavaScript in a browser) and observe the ciphertext. By carefully choosing the injected content, they could decrypt one byte at a time.

Fix: TLS 1.1 and later use random IVs for each record. The workaround for TLS 1.0 was to send a 1-byte record before each real record (the “1/n-1 split”), making the IV unpredictable.

CRIME (2012)

CRIME exploited TLS compression. When TLS compresses data before encrypting it, the compressed size leaks information about the plaintext. If the attacker can inject content and observe the compressed size, they can guess secret values (like session cookies) one character at a time.

Fix: disable TLS compression. TLS 1.3 removed compression entirely.

POODLE (2014)

POODLE exploited CBC padding in SSL 3.0. SSL 3.0’s padding scheme didn’t include the padding bytes in the MAC calculation, allowing an attacker to modify padding bytes without detection. By repeatedly modifying the padding and observing whether the server accepted or rejected the record, the attacker could decrypt one byte at a time.

Fix: disable SSL 3.0. A variant (POODLE for TLS) affected some TLS implementations that didn’t properly validate padding.

Lucky Thirteen (2013)

A timing attack on CBC mode in TLS. The time it takes to process a record with invalid padding vs valid padding differs slightly. By measuring these timing differences over many requests, an attacker can determine whether their padding guess was correct and eventually decrypt data.

Fix: constant-time MAC verification (process invalid padding in the same time as valid padding). This is extremely difficult to implement correctly. The real fix: stop using CBC. Use AEAD ciphers instead.

The Pattern

Every one of these attacks exploited either:

  1. Unnecessary complexity (Heartbeat extension, compression, renegotiation)
  2. CBC mode weaknesses (BEAST, POODLE, Lucky Thirteen)
  3. Implementation bugs (Heartbleed)

TLS 1.3’s response: remove everything that isn’t essential. No compression, no CBC, no renegotiation, no heartbeat. Fewer features means fewer things that can go wrong.


Next: The Quantum Horizon

← Previous ChapterNext Chapter →