Heartbleed is a buffer over-read vulnerability (CVE-2014-0160) in OpenSSL versions 1.0.1 through 1.0.1f, disclosed in April 2014. A flaw in the TLS heartbeat extension let a remote attacker request up to 64 KB of a server's memory per request, potentially exposing private keys, usernames, passwords and session cookies, without leaving a trace in most logs.
Key takeaways
- Heartbleed was a missing bounds check in OpenSSL's TLS heartbeat code, not a flaw in TLS itself.
- Each crafted request could leak up to 64 KB of server memory, including private keys and login credentials.
- The fix was OpenSSL 1.0.1g, but affected sites also had to revoke certificates, replace keys and force password resets.
In April 2014, a two-year-old bug in one of the internet's most trusted pieces of software turned out to let anyone quietly read the memory of millions of servers. It had a name, a logo and a bleeding-heart mascot — and it changed how the world thinks about open-source security.
What is Heartbleed?
Heartbleed is a security bug in some versions of OpenSSL, the widely used library that implements TLS encryption. It let a remote attacker read up to 64 KB of a server's memory at a time, without any login, simply by sending a crafted heartbeat message.
The bug was introduced in late 2011, when OpenSSL 1.0.1 added support for the TLS heartbeat extension defined in RFC 6520. It was publicly disclosed on 7 April 2014, and registered as CVE-2014-0160. It was classified as a buffer over-read: the software read more data than it was supposed to, and sent the extra data back to the attacker.
Heartbleed was discovered independently by a team at the Finnish security company Codenomicon — Riku, Antti and Matti — and by Neel Mehta of Google Security. Codenomicon set up the website that gave the bug its name and its now-famous logo.
The name comes from the heartbeat extension itself. A TLS heartbeat is a small "are you still there?" message. The bug made the server bleed out the contents of its memory in response — hence Heartbleed.
How does Heartbleed work?
A TLS heartbeat works like this: one side sends a short message with some payload data and says how long that payload is. The other side is supposed to echo the same payload back. OpenSSL trusted the stated length without checking it against the actual payload size.
So an attacker could send a heartbeat request with a tiny payload — even a single byte — but claim it was 64 KB long. OpenSSL would then copy 64 KB of memory starting at the payload's address and send it back in the response. Whatever happened to sit in that memory was now in the attacker's hands.
Each request leaked a different 64 KB slice, and the attacker could repeat the request as often as they liked. Over many requests, they could harvest large amounts of memory from a busy server. The leaked memory could contain private keys, usernames and passwords, session cookies, and even fragments of other users' data.
The worst part was the silence. Heartbleed requests looked like ordinary TLS traffic, and most servers logged nothing about them. An attacker could have been reading a server's memory for months before disclosure, and nobody would know. That uncertainty is what made the response so painful.
What was affected by Heartbleed?
OpenSSL 1.0.1 through 1.0.1f were vulnerable, along with the 1.0.2 beta releases. OpenSSL 1.0.0 and 0.9.8 were not affected, because they never included the heartbeat code. The vulnerable versions had been in use since March 2012, giving the bug roughly two years to spread.
OpenSSL was — and still is — everywhere. It secured web servers, email servers, VPNs, chat services, routers and embedded devices. At disclosure, the two most widely used web servers, Apache and nginx, served over 66% of active sites, and OpenSSL protected many of them — though only a portion ran the vulnerable versions.
Any service using the vulnerable library was at risk, including services that support STARTTLS for email, such as IMAP, SMTP and POP, as CERT/CC warned in its advisory.
The bug could be exploited against both TLS servers and TLS clients. A malicious server could also attack a vulnerable client, such as a phone or laptop connecting to it. That two-way risk made Heartbleed unusually dangerous: it was not just a server problem.
Large sites patched quickly. Smaller organizations, embedded devices and appliances took far longer — and some never patched at all.
What could attackers steal with Heartbleed?
The short answer is: whatever happened to be in the server's memory at the time. On a busy web server, that could be extremely valuable. CERT/CC listed four categories of exposed material: primary key material such as secret keys, secondary key material such as usernames and passwords, protected content used by the service, and memory addresses useful for bypassing exploit protections.
Private keys were the most serious prize. A server's private key is what proves its identity and decrypts traffic. With it, an attacker could impersonate the site, decrypt past traffic they had recorded, and run man-in-the-middle attacks. That is why patching alone was not enough: every affected site had to generate new keys and get new certificates.
Session cookies were the most practical prize. A stolen session cookie lets an attacker log in as a user without knowing their password. Usernames and passwords in memory were the most direct prize, and they were often the first thing attackers looked for.
Whether Heartbleed was abused at scale before disclosure is still not known, but the absence of evidence is not proof. Because the attack left almost no trace, security teams had to assume the worst and act as if secrets had leaked.
Heartbleed vs other famous vulnerabilities
Heartbleed is often mentioned alongside Shellshock and Log4Shell, the other landmark bugs of the 2010s and early 2020s. They are different in kind, but they share one lesson: a flaw in a shared component can put the whole internet at risk.
| Heartbleed (2014) | Shellshock (2014) | Log4Shell (2021) | |
|---|---|---|---|
| CVE | CVE-2014-0160 | CVE-2014-6271 | CVE-2021-44228 |
| Component | OpenSSL library | Bash shell | Log4j logging library |
| Flaw type | Buffer over-read | Code execution via environment variables | Remote code execution via JNDI lookups |
| What it gave attackers | Memory contents: keys, passwords, cookies | Remote command execution | Remote code execution |
| Needs authentication? | No | No | No |
| Fix | OpenSSL 1.0.1g | Patched Bash | Patched Log4j |
Heartbleed stands out because it was so simple — a missing bounds check, a handful of lines of code — and because it attacked confidentiality rather than control. Shellshock and Log4Shell let attackers run commands. Heartbleed let them quietly read secrets, which can be harder to detect and harder to undo.
How was Heartbleed fixed?
The code fix itself was small. OpenSSL released version 1.0.1g on 7 April 2014, the same day the bug was disclosed. The patch added a bounds check: the heartbeat code now verifies that the payload length claimed in the request matches the payload that actually arrived.
The NIST analysis of the bug traces the flaw to the missing check in the heartbeat code in the d1_both.c and t1_lib.c files.
But fixing the code was only step one. Because secrets may already have leaked, every affected organization had to do the full cleanup, in this order:
- Patch OpenSSL to 1.0.1g or later, or recompile with heartbeat support disabled using the
-DOPENSSL_NO_HEARTBEATSflag. - Generate new private keys for every affected certificate, because the old ones may have been exposed.
- Reissue certificates with the new keys, and revoke the old certificates.
- Force password resets for users — but only after patching, since resetting a password on a still-vulnerable server just hands the new password to an attacker.
- Invalidate sessions so any stolen session cookies stop working.
That sequence mattered. Many sites patched fast but revoked slowly, and users who changed passwords before the patch were still exposed. If you run a site today, you can check that its certificate and TLS setup are healthy with our free SSL checker.
How do you check if a system is still vulnerable?
Heartbleed is easy to test for, which is one reason it was so widely scanned in 2014. Security teams used dedicated scanners, and many vulnerability scanners still include a Heartbleed check today. The test sends a heartbeat request with a deliberately wrong length and watches whether the server returns more data than it should.
For your own systems, the reliable check is your software inventory, not a single scan. Find every place OpenSSL is used — servers, appliances, containers, embedded devices, VPN endpoints — and confirm the version. Anything on OpenSSL 1.0.1 through 1.0.1f, or a 1.0.2 beta, is vulnerable.
Watch out for the long tail. The hardest Heartbleed cases were not web servers but devices: routers, printers, storage appliances and industrial systems with OpenSSL baked in and no easy update path. If a device cannot be patched, isolate it from untrusted networks or replace it. Our small business cybersecurity checklist covers keeping an inventory of exactly this kind of device.
Also check your certificates. A certificate issued before a Heartbleed cleanup may still be using a key generated on a vulnerable server. If you are unsure, reissue it — a new certificate is cheap, and a leaked private key is not.
What did Heartbleed change?
Heartbleed changed how the industry funds and reviews open-source security. Before 2014, OpenSSL was maintained by a tiny team on a shoestring budget, despite securing a huge share of the internet. Afterward, major companies funded the Core Infrastructure Initiative and later the Open Source Security Foundation, and OpenSSL itself received far more review and resources.
It also changed disclosure practice. Heartbleed was disclosed with a clear name, a logo, a dedicated website and plain-language guidance — and that communication style has been copied by almost every major vulnerability since. A bug people can understand gets fixed faster than one they cannot pronounce.
For developers, the lesson was about memory safety. Heartbleed was a classic C memory bug: a missing bounds check. It helped push the industry toward memory-safe languages, safer libraries and fuzz testing — automated testing that throws malformed inputs at code to find exactly this kind of flaw.
For users, the lesson was simpler and still applies: when a major vulnerability is disclosed, wait until the service has actually patched and reissued its certificates before changing your password. Changing it too early can be worse than waiting a day.
The bottom line
Heartbleed was a small bug with enormous reach: one missing check in OpenSSL's heartbeat code let attackers read the memory of servers across the internet, including private keys and passwords. It was fixed in OpenSSL 1.0.1g, but the real fix required new keys, new certificates and password resets.
Its legacy is a healthier one. Open-source projects that underpin the internet now get more funding and scrutiny, and the Heartbleed response — patch, replace keys, revoke, reset — is still the template for handling a leaked-secret vulnerability. Check your own site's TLS setup with the free SSL checker to make sure its certificate and configuration are sound.
Frequently asked questions
What is Heartbleed in simple terms?
Heartbleed was a bug in OpenSSL, the software many websites used to encrypt traffic. It let an attacker ask a server for a small piece of data and receive up to 64 KB of the server's memory instead, which could contain passwords, private keys and other secrets.
What is CVE-2014-0160?
CVE-2014-0160 is the official identifier for Heartbleed. It describes a buffer over-read in the TLS and DTLS heartbeat implementation in OpenSSL 1.0.1 before 1.0.1g, which allowed remote attackers to obtain sensitive information from process memory.
Which OpenSSL versions were affected by Heartbleed?
OpenSSL versions 1.0.1 through 1.0.1f and the 1.0.2 beta releases were affected. The 1.0.0 and 0.9.8 branches were not affected because they did not include the heartbeat extension code.
Is Heartbleed still a risk today?
Patched systems are not at risk from Heartbleed itself, but the bug still appears in scans because old, unpatched devices and embedded systems remain in use. Any system still running OpenSSL 1.0.1 through 1.0.1f should be treated as vulnerable and updated or replaced.
How do I know if a website was affected by Heartbleed?
You cannot tell from the outside today whether a site was affected in 2014. At the time, users were advised to check whether a site had patched and reissued its certificate before changing their password, because changing a password on a still-vulnerable site did not help.
What is the difference between Heartbleed and a virus?
Heartbleed was not a virus or malware. It was a programming bug in a widely used library. Attackers exploited it remotely over the network, without installing anything on the victim's computer.
Did Heartbleed affect websites only, or also other services?
Any service using the vulnerable OpenSSL library could be affected, including web servers, email, VPNs and chat services. Services supporting STARTTLS, such as IMAP, SMTP and POP mail, were also at risk.
What should I do if a server I manage still runs old OpenSSL?
Update OpenSSL to a supported version immediately, then assume secrets may have leaked: replace private keys, reissue certificates, revoke the old ones, and force password resets for affected accounts.
Sources
- CERT Coordination Center — Vulnerability Note VU#720951
- NIST — Heartbleed Revisited: Is it just a Buffer Over-Read?
- LWN.net — Heartbleed bug exposes OpenSSL installations
- Cloud Foundry — CVE-2014-0160 Heartbleed
- OpenSSL Project — TLS heartbeat read overrun (CVE-2014-0160) security advisory
- CISA — OpenSSL Heartbleed Vulnerability alert
- Heartbleed.com — The Heartbleed Bug
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against CERT/CC Vulnerability Note VU#720951, the OpenSSL security advisory for CVE-2014-0160, the CISA alert on the Heartbleed vulnerability, the NIST analysis of CVE-2014-0160 and heartbleed.com.
How we write and fact-check →