Heartbleed (CVE-2014–0160): The Bug That Shook the Internet
OpenSSL's TLS heartbeat extension failed to check that the client's claimed payload length matched the actual data sent, so a short request with an inflated length caused the server to copy adjacent memory into its reply. An attacker could repeatedly request oversized heartbeats and receive fragments of server memory that might contain private keys, passwords, session cookies or other sensitive data.
medium.com
Published on medium.com
That bug was Heartbleed — and it remains one of the most famous vulnerabilities in internet history.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The heartbeat handler copied the number of bytes claimed by the client without verifying that the claim matched the actual length of the supplied payload.
Impact
Attackers could potentially obtain private keys, passwords, session cookies and other sensitive data, and the attack often left little or no evidence in server logs.
What the attacker needed
Server runs vulnerable OpenSSL 1.0.1 to 1.0.1f; network access to the TLS service; no authentication needed
The fix
OpenSSL was patched to validate the claimed heartbeat payload length against the actual data received, and organisations were advised to replace keys and certificates and reset passwords.
How it was found
- The attacker sends a heartbeat request with a short payload but claims a much larger payload size.
- The vulnerable server accepts the claimed size without checking it against the real payload length.
- The server builds a reply of the claimed size, reading beyond the supplied payload into adjacent memory.
- The reply returns the original message plus fragments of server memory to the attacker.
- The attacker repeats the request many times to collect more memory fragments.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A server and a client can send each other small 'heartbeat' messages to check a secure connection is still alive. The server believed the client when it said its message was much bigger than it really was, so it sent back extra bytes from its own memory. Those extra bytes could include secrets like passwords or encryption keys.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.