# What Is Heartbleed (CVE-2014-0160)? Definition and Examples

> Heartbleed is a 2014 OpenSSL bug (CVE-2014-0160) in the TLS heartbeat extension that let anyone read chunks of server memory, including private keys.

Source: https://ssl.sh/glossary/heartbleed/
Last updated: 2026-11-10

Heartbleed is a missing bounds check in OpenSSL's implementation of the TLS/DTLS heartbeat extension (RFC 6520). It affected OpenSSL 1.0.1 through 1.0.1f and was fixed in 1.0.1g, released in April 2014. A heartbeat request carries a payload and a claimed length; vulnerable versions echoed back as many bytes as the length claimed, up to about 64 KB, regardless of the real payload size. Each request leaked a different chunk of process memory, without authentication and without leaving traces in normal logs. It was found independently by Neel Mehta of Google Security and by engineers at Codenomicon.

## Why it matters
Leaked memory could contain session cookies, passwords and, in some cases, the server's [private key](https://ssl.sh/glossary/private-key/); researchers demonstrated key extraction from a test server shortly after disclosure. Because exploitation left no record, operators had to assume compromise. The correct response was therefore more than patching [OpenSSL](https://ssl.sh/glossary/openssl/): generate new keys, obtain new certificates and [revoke](https://ssl.sh/glossary/revocation/) the old ones, invalidate sessions and ticket keys, and ask users to change passwords. Heartbleed also showed how much of the internet depended on a thinly funded open source project, and prompted new funding efforts such as the Linux Foundation's Core Infrastructure Initiative.

## Example
```bash
openssl version
# 1.0.1 through 1.0.1f: vulnerable
# 1.0.1g and later, and the 0.9.8 and 1.0.0 branches: not affected

nmap -p 443 --script ssl-heartbleed example.com
```

## Common misconceptions
- **Heartbleed was a flaw in the TLS protocol.** It was an implementation bug in OpenSSL; TLS libraries with their own code were not affected.
- **Upgrading OpenSSL was enough.** Anything that may have leaked, private keys above all, had to be replaced, because a patch does not un-leak data.
- **It is still a common risk today.** Current systems have not shipped a vulnerable OpenSSL for many years; what remains are unpatched appliances and embedded devices.

## Related terms

- [OpenSSL](https://ssl.sh/zh/glossary/openssl/): OpenSSL 是开源密码学工具包，由 TLS 协议库 libssl、通用密码库 libcrypto 和 openssl 命令行工具组成。
- [私钥](https://ssl.sh/zh/glossary/private-key/): 私钥是非对称密钥对中保密的那一半，TLS 服务器用它证明自己拥有证书里的那把公钥。
- [证书吊销](https://ssl.sh/zh/glossary/revocation/): 证书吊销是 CA 在证书到期前宣布其作废的操作，通过 CRL 或 OCSP 对外公布，使客户端不再信任这张证书。
- [密钥轮换](https://ssl.sh/zh/glossary/key-rotation/): 密钥轮换是按计划或在安全事件后，用新生成的密钥替换旧密钥，以限制密钥泄露造成损失的做法。
- [证书续期](https://ssl.sh/zh/glossary/certificate-renewal/): 证书续期是在证书到期前申请一张新证书来替换它，最好全自动完成并同时更换密钥对。
- [Session Ticket](https://ssl.sh/zh/glossary/session-ticket/): Session Ticket 是服务器交给客户端保管的加密会话状态，客户端下次连接时出示它即可恢复会话，服务器无需保存任何状态。
