CVE REFERENCE | CRITICAL VULNERABILITY
Active ThreatApril 7, 201410 min read

CVE-2014-0160 Explained: Heartbleed and the Vulnerability That Broke the Internet

A catastrophic memory disclosure vulnerability in OpenSSL's TLS heartbeat extension that allowed anyone to silently read server memory — including private keys, session tokens, and plaintext passwords — with no authentication and no trace in logs.

Sources:Codenomicon / Synopsys|Google Security|OpenSSL Security Advisory|NIST NVD
Eric Bang
Eric Bang

Founder & Cybersecurity Evangelist

7.5
CVSS Score
17%
Of internet HTTPS servers affected
500M+
Certificates requiring revocation
2yr+
Vulnerability existed before discovery

CVE-2014-0160, named Heartbleed, was independently discovered by Neel Mehta of Google Security and researchers at Codenomicon, disclosed on April 7, 2014. It is a bounds-checking vulnerability in OpenSSL's implementation of the TLS heartbeat extension — a keep-alive mechanism that verifies a connection is still alive without a full renegotiation.

The flaw: when a heartbeat request is received, OpenSSL trusts the client-specified payload length without verifying the actual payload matches that length. By claiming a 64KB payload while sending 1 byte, an attacker causes the server to respond with 64KB of server memory — whatever happens to be adjacent to the heartbeat buffer.

That adjacent memory can contain the server's private SSL/TLS key (enabling decryption of all past and future traffic), active session tokens, usernames and passwords transmitted over the connection, and other sensitive data. No authentication required. No trace in server logs.

How the Heartbleed Exploit Works

OpenSSL's vulnerable code reads the stated payload length from the client's HeartbeatRequest without verifying the actual payload is that long. It then copies (stated_length) bytes starting from the actual payload pointer into the response buffer and sends the response to the attacker.

If the client states 65,535 bytes but sends 1 byte, OpenSSL copies 65,535 bytes from server memory into the response — 65,534 bytes beyond the actual payload. Each request leaks up to 64KB of server memory. Requests can be repeated indefinitely with zero authentication and zero log evidence, progressively mapping large portions of server memory.

1

Send Malformed HeartbeatRequest

Attacker sends a TLS HeartbeatRequest with payload_length set to 65,535 and an actual payload of 1 byte.

2

Server Reads Past Buffer Boundary

OpenSSL reads 65,535 bytes from memory starting at the 1-byte payload — reading 65,534 bytes into adjacent server memory.

3

Server Returns Memory Contents

OpenSSL constructs a HeartbeatResponse containing the overread memory contents and sends it to the attacker.

4

Extract Sensitive Data

Attacker parses the response for private keys (identifiable by RSA key headers), session cookies, authentication tokens, and plaintext credentials.

5

Repeat to Map Server Memory

Attacker sends hundreds of requests to collect different memory pages, progressively increasing probability of capturing the private TLS key.

Affected Versions and Scope

CVE-2014-0160 affects OpenSSL 1.0.1 through 1.0.1f. The heartbeat extension code was introduced in OpenSSL 1.0.1 (March 2012) and the flaw existed for over two years before discovery.

At the time of disclosure, an estimated 17% of all HTTPS servers on the internet were running vulnerable OpenSSL versions, including servers at Google, Yahoo, and Amazon. The bug was present in OpenSSL packages shipped with Ubuntu 12.04, Debian Wheezy, CentOS 6.5, Fedora 18+, and many others.

How to Patch Heartbleed and Recover

Patching Heartbleed requires not only upgrading OpenSSL but also revoking and replacing all TLS certificates. If private keys were exposed before patching, they remain compromised indefinitely — the patch alone is insufficient.

Upgrade OpenSSL to 1.0.1g or later

Upgrade the OpenSSL package immediately. On Debian/Ubuntu: apt-get update && apt-get install openssl. Verify the version: openssl version.

Revoke and replace all TLS certificates

Generate new private keys — never reuse old keys — and request new TLS certificates from your CA. Revoke all previously issued certificates for affected hosts.

Invalidate all active sessions

Rotate all session secrets and invalidate all active user sessions. Captured session tokens remain valid until explicitly invalidated server-side.

Force user password resets

Assume passwords transmitted over TLS before patching may have been captured in server memory. Force resets for all users.

Rotate all secrets from server memory

Rotate SSH host keys, API keys, HMAC secrets, and any other secret material that may have resided in server memory accessible to the web process.

The bottom line

Heartbleed demonstrated that the most critical vulnerabilities can be completely silent — no exploitation evidence, no server-side logs, no user complaints. OpenSSL 1.0.1f and earlier must never be running in production. If you find it anywhere in your environment, patch, re-key, and rotate everything immediately. The patch alone without certificate revocation and key rotation leaves the system compromised.

Free newsletter

Get threat intel before your inbox does.

50,000+ security professionals read Decryption Digest for early warnings on zero-days, ransomware, and nation-state campaigns. Free, weekly, no spam.

Unsubscribe anytime. We never sell your data.

Eric Bang
Author

Founder & Cybersecurity Evangelist, Decryption Digest

Cybersecurity professional with expertise in threat intelligence, vulnerability research, and enterprise security. Covers zero-days, ransomware, and nation-state operations for 50,000+ security professionals weekly.

HeartbleedCVE-2014-0160OpenSSLTLSmemory-disclosurecryptography