Join our Newsletter — 33% off our NHI Course
Home› Guides› Heartbleed for Beginners: How a Tiny Bug in…
Guide Vulnerability Management

Heartbleed for Beginners: How a Tiny Bug in OpenSSL Leaked Secrets From Websites

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 3 December 2026 11 min read
On this page

Heartbleed was a 2014 bug in OpenSSL that could make websites leak secrets from their memory.

This guide is for anyone who has heard of Heartbleed and wants a plain explanation. You do not need to know any code. If you run a website, a shop online or any device with a web page, the lessons still apply today.

In short

  • OpenSSL is free, open-source software that many websites use to protect traffic with the padlock in your browser.
  • A programming mistake let outsiders read small pieces of a server's memory, which could include passwords and secret keys.
  • The fix was to update OpenSSL, then replace the website's secret keys and certificates, and ask users to change passwords.
  • The bug sat in released software for about two years before it was found.

What you will learn

  • Explain what Heartbleed was in one or two sentences.
  • Describe why a memory leak can expose passwords and keys.
  • Check the three clean-up steps after a bug like this.
  • Ask a supplier whether their software depends on open-source parts.
Padlock software (TLS)
the rules that scramble traffic between your browser and a website.
Short-term notepad (memory)
where a computer keeps the data it is working on right now.
Website's secret stamp (private key)
the secret a website uses to prove who it is.

What is Heartbleed?

Think of a receptionist who answers "are you still there?" calls all day. Because of a small mistake in her training, she sometimes reads out extra papers from her desk as well. Nobody notices, because the calls look normal.

Heartbleed worked in a similar way. Websites use TLS (the technology behind the browser padlock) to keep traffic private. Many use a free toolkit called OpenSSL to do this. OpenSSL had a feature called "heartbeat" that checks whether a connection is still alive [1].

A programming mistake in that feature meant a request could make the server send back pieces of its memory [1]. The researchers who found it stressed that it was a mistake in OpenSSL's code, not a flaw in TLS itself [1].

Where the comparison stops working: a receptionist might notice what she reads out. The server had no idea, and the researchers said the leak left nothing unusual in its logs [1].

Heartbleed is one of several well-known bugs. Famous Vulnerabilities for Beginners puts it beside others. This page looks only at Heartbleed.

Why does it matter?

A memory leak sounds small. But a server's memory holds the very secrets that keep a website safe and its users signed in.

If you run a website or online shop

What could happen: an old, unpatched part leaks the secret key that proves your site is genuine.

Check this: ask your host which version of its security software it runs and how it gets updates.

Next: Patch Management for Beginners

If you use websites every day

What could happen: your password or signed-in session is caught in leaked memory.

Check this: when a site asks you to change your password after a fix, do it, and do not reuse it.

Next: TLS and HTTPS for Beginners

If you are new to IT work

What could happen: you install the update but leave the old certificate and key in place.

Check this: after a leak like this, replace keys and certificates as well as the software.

Next: Machine Identities and Certificates for Beginners

What does it look like?

For defenders, Heartbleed looked like a line in a software list. Here is a made-up "Am I affected?" card of the kind a small team might keep.

Example only. All values are made up.

Server:        shop.example.com
Uses OpenSSL:  yes                         (1)
Version:       1.0.1-EXAMPLE (in affected range)   (2)
Updated to:    not yet                     (3)
Certificate:   issued 0000-00-00, not replaced   (4)
User passwords reset: no                   (5)
  1. Many web servers rely on OpenSSL without saying so on screen.
  2. In a real file, this line would contain the exact version number. Versions 1.0.1 to 1.0.1f were affected [1].
  3. The fixed version was 1.0.1g or later [1].
  4. A certificate and key from before the fix may have leaked, so it should be replaced.
  5. Users are asked to change passwords only after the site is fixed.

Why this is risky: updating the software stops new leaks. It does not cancel a key that may already have been copied.

The safer way: update first, then replace keys and certificates, then reset passwords and sessions [1].

How does it work?

  1. A browser and a website open a protected connection. Both sides use TLS to scramble the traffic.
  2. They check the line is still open. The heartbeat feature sends a small "still there?" message [1].
  3. The bug sends back too much. On affected versions, the reply could include pieces of the server's memory, up to 64 kilobytes at a time [1].
  4. Repeated requests reveal more. The researchers said someone could keep asking until secrets showed up [1].
  5. Secrets can leak. Leaked memory could hold the site's private keys, user names and passwords, session cookies and private messages [1].
Diagram titled What Heartbleed leaked. Three panels. Panel 1, Normal heartbeat: the browser asks still there, the server replies with the same short message. Panel 2, Unpatched OpenSSL: the server replies with the message plus extra pieces of its memory, which may hold private keys, passwords and session cookies. Panel 3, After the fix: the server sends back only what it should. A green note underneath says the update stops new leaks, and keys, certificates and passwords that may have leaked still need replacing.
Figure 1. Heartbleed sent back more than it should. The fix stopped new leaks, but old secrets still needed replacing.

The bug came into OpenSSL in December 2011 and was in released versions from March 2012 [1]. It was made public in April 2014 [1]. That is roughly two years in which affected servers could leak without anyone knowing.

Website private keys and certificates are a kind of non-human identity: an identity that belongs to a machine, not a person. Heartbleed showed why these need an owner and a plan to replace them.

The open-source lesson

OpenSSL is open source, which means anyone can read and reuse its code. The researchers called it the most popular open-source cryptographic library and urged people to support its development [1]. In May 2014, a Linux Foundation project named OpenSSL among the first projects it would fund, including two full-time core developers [3].

A similar idea came back in 2021 with Log4Shell, a flaw in Log4j, another widely used open-source part [2]. Many organisations had to find out first whether they even used it.

A worked example

This story is made up to show the idea.

Wilf Novak runs Fern Deli, a small shop that takes online orders through its own website. A local web firm built the site some years ago.

Wilf reads about Heartbleed and wonders if old bugs like it still matter. He sees that a US government list of bugs known to be used by attackers added Heartbleed in 2022 [2]. So he asks the web firm three questions.

First, does the site use OpenSSL, and which version? Second, when were the site's certificate and key last replaced? Third, how does the firm hear about urgent security updates?

The web firm checks. The main website runs a current version. But an old order-printing box in the kitchen has its own small web page. Nobody has updated it since it was installed.

The firm updates the box, or plans to replace it if no update exists. It also issues a new certificate and key for the main site, as part of a regular renewal. In the records available to them, they see no sign that anything leaked.

Wilf adds one line to his supplier checklist: "Tell me which open-source parts you rely on, and how you keep them updated."

Wilf learned that a fix has two halves. Updating the software stops new leaks. Replacing keys and passwords deals with anything that may already have leaked.

Myths and mistakes

What people thinkWhat is true
Heartbleed broke the padlock technology itself.It was a coding mistake in OpenSSL, not a flaw in TLS.[1]
Installing the update is the whole fix.Keys, certificates and passwords that may have leaked also need replacing.[1]
We would have seen an attack in our logs.The researchers said exploitation left no unusual log entries.[1]
Users should change passwords straight away.Change them after the site is fixed, or the new password could leak too.
Heartbleed is old, so it no longer matters.A US government list of bugs used by attackers added it in 2022.[2]

What can I do this week?

  • Ask your website host or supplier which security software it uses and how it is updated.
  • List any older devices with their own web page, such as routers or printers, and check they still get updates.
  • Find out who renews your website's certificate, and when it was last replaced.
  • Use a password manager so that one leaked password does not open other accounts.
  • Read OpenSSL for Beginners to see what the toolkit does.

Checklist

  • I can explain Heartbleed as a memory leak in OpenSSL.
  • I know that it was a coding mistake, not a flaw in TLS.
  • I know what leaked memory could hold: keys, passwords and session cookies.
  • I know the order of the clean-up: update, replace keys, then reset passwords.
  • I know who updates the security software on our website.
  • I know who replaces our certificates and keys.
  • I ask suppliers which open-source parts they rely on.

Common questions

Why is it called Heartbleed?

Because the bug was in OpenSSL's "heartbeat" feature, and it let data bleed out of the server's memory. The feature itself was meant only to check that a connection was still open. The bug was in how OpenSSL handled those small check messages.

Who found Heartbleed?

Engineers at the security firm Codenomicon and a researcher at Google Security found it separately. Codenomicon reported it to the OpenSSL team, and Finland's national cyber security centre helped coordinate the response, according to the researchers' own site [1].

Do I need to do anything now?

Most people do not. A fixed version has been out since 2014 [1]. If you run a website or device, check that its software is supported and updated. If you reused an old password from 2014 anywhere, changing it is still a good habit.

Was Heartbleed in the padlock everyone uses?

No. It was in one popular toolkit, OpenSSL, and only in versions 1.0.1 to 1.0.1f. Websites using other toolkits, or older OpenSSL versions, were not affected by this bug. The fixed version was 1.0.1g, according to the researchers [1].

What does Heartbleed have to do with open-source funding?

OpenSSL was free software used by a huge number of websites. The researchers asked people to support its development. Soon after, a Linux Foundation project chose OpenSSL as one of the first projects to fund, including two full-time core developers [3].

Where next?

Ready for the detail? Read the practitioner guide: OpenSSL for Security Teams. It goes further into finding OpenSSL versions, checking servers and handling keys and certificates.

Also useful:

Related NHI Mgmt Group resources: Non-Human Identities for Beginners, The CISA KEV Catalogue for Beginners and Open Source Security Guide.

Key terms

Transport Layer Security
The technology that protects data travelling between your browser and a website.
Buffer over-read
A mistake where software reads past the data it should, and can expose information it should not.
Private key
The secret half of a key pair, used by a website to prove who it is.
Digital certificate
An electronic document that links a website's name to its key, issued for a set period.
Open source software
Software whose code anyone can read, change and share.
Known exploited vulnerability
A flaw that attackers are known to have used, so fixing it is urgent.
Forward secrecy
A setting that keeps past traffic safe even if a server's key is stolen later.

Sources and further reading

  1. Synopsys (Codenomicon), "The Heartbleed Bug", heartbleed.com, April 2014. Covers CVE-2014-0160. https://heartbleed.com/ (accessed 3 Dec 2026).
  2. Cybersecurity and Infrastructure Security Agency (CISA), "Known Exploited Vulnerabilities Catalog", entries CVE-2014-0160 (OpenSSL, added 4 May 2022) and CVE-2021-44228 (Apache Log4j2, added 10 December 2021). https://www.cisa.gov/known-exploited-vulnerabilities-catalog (catalogue version 2026.10.21, accessed 3 Dec 2026).
  3. The Linux Foundation, "The Linux Foundation's Core Infrastructure Initiative Announces New Backers, First Projects to Receive Support and Advisory Board Members", press release, 29 May 2014. https://www.linuxfoundation.org/press/press-release/the-linux-foundations-core-infrastructure-initiative-announces-new-backers-first-projects-to-receive-support-and-advisory-board-members (accessed 3 Dec 2026).

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.