Home / Blog / Heartbleed: The Two-Year-Old Bug That Leaked Half the Internet's Secrets
Korp Labs · Field Notes

Heartbleed: The Two-Year-Old Bug That Leaked Half the Internet's Secrets

 ·  4 min read  ·  By Korp VPN

In April 2014, researchers disclosed a flaw in OpenSSL, the encryption library that secured a large majority of the world's HTTPS websites, email servers and VPNs.

The bug let an attacker ask any affected server for a chunk of its own memory, and the server would send it. No login required, no exploit chain, no privilege escalation. Just ask, repeatedly, and read whatever happened to be lying around in the process.

Whatever was lying around included passwords being processed, session cookies, private messages, and — in the worst case — the server's private encryption key.

It had been in released code for two years.

What actually went wrong

TLS, the protocol behind the padlock in your browser, includes a small feature called a heartbeat. Its job is to keep a connection alive: one side sends a short message and asks the other to echo it back.

The message contains two things — some data, and a number saying how long that data is.

The implementation trusted the number.

If you sent one byte of data and claimed it was sixty-four kilobytes long, the server would copy sixty-four kilobytes starting from your one byte and send it all back. The extra 65,535 bytes were simply whatever else was sitting in the server's memory at that moment.

That is the whole vulnerability. A missing comparison between "how much data did you claim to send" and "how much data did you actually send." In the language OpenSSL is written in, nothing checks this for you.

Repeat the request in a loop and you get a rolling window into a live server's working memory. On a busy site, that memory contains other users' traffic as it is being processed.

Why it was so much worse than a normal bug

Most serious vulnerabilities leave evidence. A break-in creates log entries, a crash, an anomaly.

Heartbleed left nothing. Heartbeat requests were a normal part of the protocol, and a malformed one was not recorded anywhere. There was no way for any affected organisation to determine whether they had been attacked, or what had been taken. The honest answer for every affected site was: we cannot know.

That uncertainty drove the response. Because private keys might have leaked, certificates could not simply be trusted going forward — they had to be revoked and reissued. Because session cookies might have leaked, users had to be logged out everywhere. Because passwords might have leaked, they had to be changed — but only after the server was patched and re-keyed, since changing a password on a still-vulnerable server just put the new one in the same leaking memory.

Roughly half a million trusted certificates were estimated to be affected. Around 17% of all secure web servers were vulnerable at disclosure.

How a bug like this survives two years

The uncomfortable part of the Heartbleed story is not the code. It is the economics.

OpenSSL secured an enormous fraction of global internet traffic and was maintained by a very small number of people, mostly unpaid, on a budget of a few thousand dollars a year in donations. The code was old, dense, and written in a style that made review difficult. Almost every large technology company depended on it. Almost none of them contributed to it.

The direct consequence was the formation of industry-funded initiatives to support critical open-source infrastructure, and a broader recognition that "everyone uses it" and "someone is looking after it" are entirely separate claims. That lesson has had to be relearned several times since.

What it means for you

Heartbleed is a server-side bug. There was nothing an individual user could have done to prevent exposure — which is precisely the point worth internalising.

You cannot verify the security of the services you use. You can choose reputable ones, but you cannot audit them, and the strongest password in the world does not help if the server leaks it out of memory while checking it.

Given that, the sensible posture is to limit how much a single failure costs you:

There is also a narrower point about what encryption does and does not promise. HTTPS protects data in transit — nobody between you and the server can read it. It says nothing about what happens at the endpoints. A VPN has exactly the same boundary: it protects the journey, moving the observation point away from the local network and your ISP, and it cannot protect data once it arrives somewhere that mishandles it.

Understanding where each layer's protection stops is most of what security literacy actually is. Heartbleed was a very expensive lesson in one specific stopping point: encryption in transit is worth nothing if the machine at the far end will hand out its own memory to anyone who asks politely.

encryptionvulnerabilitytlsnetwork security

Read this on a network nobody is watching

Korp VPN encrypts every packet leaving your device with AES-256 and a stealth protocol that looks like ordinary HTTPS traffic. Unlimited bandwidth, 20+ countries, a strict no-logs policy, and a 5-day free trial — from $1.60 per month.

← Previous
NotPetya: The Fake Ransomware That Caused $10 Billion in Damage
Next →
Albert Gonzalez: The Informant Who Stole 170 Million Credit Cards While Working for the Government

More from Korp Labs

What "No-Logs VPN" Really Means and How to Check the Claim

Almost every VPN says it keeps no logs. The phrase can mean very different things. Here is what a meaningful no-logs policy covers, and the questions that expose a weak one.

VPN vs Proxy vs Tor: What Each One Actually Protects

They all change your IP address, but they protect very different things. A plain-language comparison of VPNs, proxies and Tor, and how to pick the right one for what you are doing.

How to Test Your VPN for Leaks: DNS, IPv6 and WebRTC

A VPN can be connected and still leak your real IP address or DNS lookups. Here is how to run the three tests that matter in under five minutes, and how to fix what you find.