The Heartbleed bug (CVE-2014-0160) was discovered in April 2014 and affected OpenSSL’s implementation of the TLS/DTLS heartbeat extension. The vulnerability had existed since 2012 and affected approximately half a million servers worldwide at the time of disclosure.

How the Exploit Worked

The attack exploited a critical programming error in the heartbeat mechanism:

Normal Heartbeat Process: A computer sends a heartbeat request containing a payload and its declared length. The server echoes back the same payload to confirm the connection is alive.

The Vulnerability: The server failed to verify whether the claimed payload length matched the actual payload. An attacker could send a tiny payload but claim it was up to 64KB, causing the server to read and return up to 64KB of its own memory — including whatever happened to be adjacent in memory. Multiple requests could be chained to harvest large amounts of sensitive data.

Impact and Exploitation

The vulnerability allowed attackers to:

  • Access sensitive data including passwords, credit card numbers, and private encryption keys
  • Read server memory without leaving any trace in server logs
  • Potentially conduct man-in-the-middle attacks using stolen encryption keys

Real-World Incidents

Evidence suggests that some attackers may have exploited the flaw for at least five months before its public disclosure. After disclosure, the vulnerability was actively exploited by cybercriminals before sites could patch their systems. As of December 2019, over 77,000 devices worldwide were still vulnerable to Heartbleed.

The Name

The vulnerability was named “Heartbleed” because it was found in the heartbeat extension of OpenSSL — a routine mechanism for keeping TLS connections alive. The “bleeding” refers to the memory leak that allowed sensitive data to spill out from the server’s heart.

The Heartbleed vulnerability demonstrates how a seemingly simple protocol like heartbeat can be exploited when implemented incorrectly, leading to severe security consequences across the entire internet.