← back
CVE-2014-0160highunder attackCWE-125

CVE-2014-0160

100Vexday Risk Score

Patch now. It under exploitation confirmed by CISA and has a working public exploit.

ssvc Actcvss 7.5epss 100%
from disclosure to weapon0 days
Published on NVDApr 7
1st PoCApr 7
metasploitApr 7
CISA KEV+2949d
exploitation probability
100%top 1% of all CVEs
observed exploitation
yesCISA + VulnCheck
116 public exploit(s)
Action required by CISAfederal deadline: 2022-05-25

Apply updates per vendor instructions.

Summary

Falha de leitura fora dos limites (buffer over-read) na implementação da extensão TLS/DTLS Heartbeat (RFC 6520) do OpenSSL, que permite a um atacante remoto e não autenticado extrair até 64KB de memória de processo por requisição, repetidamente, sem deixar rastro necessário. Afeta qualquer serviço que use OpenSSL 1.0.1 até 1.0.1f para TLS/DTLS — o que inclui a maior parte da web em 2014 — e pode expor chaves privadas TLS, credenciais e dados de sessão em texto claro. É considerada uma das vulnerabilidades mais impactantes já divulgadas justamente pela combinação de trivialidade de exploração, ausência de autenticação e alcance (praticamente toda a internet HTTPS da época).

Technical detail

A extensão Heartbeat permite que um lado da conexão TLS/DTLS envie um payload arbitrário e um campo de comprimento declarado; o outro lado deve devolver exatamente esse payload como prova de que a conexão está viva. A falha está em d1_both.c (DTLS) e t1_lib.c (TLS): o código que processa o HeartbeatMessage confia no campo de comprimento informado pelo remetente sem validar que ele corresponde ao tamanho real do payload recebido. Isso é uma leitura fora dos limites — CWE-125.

How it’s exploited

O atacante envia um HeartbeatRequest com um payload minúsculo (por exemplo, 1 byte) mas declara um campo de comprimento de até 65.535 bytes (o máximo do campo de 16 bits do protocolo). O servidor (ou cliente) vulnerável aloca o buffer de resposta usando o comprimento declarado, copia o payload real mais o restante da memória adjacente ao buffer de heap onde ele residia, e devolve tudo ao atacante. Como a memória adjacente pode conter qualquer coisa alocada anteriormente pelo processo — chaves privadas TLS carregadas na inicialização, buffers de sessão, credenciais de autenticação básica, cookies de sessão, fragmentos de requisições de outros usuários — o atacante recebe até 64KB de memória de processo por chamada, sem limite no número de tentativas.

Não exige autenticação, não exige configuração não padrão, não exige interação do usuário e funciona antes mesmo da conclusão do handshake TLS em alguns casos (o heartbeat pode ser trocado durante o handshake). A falha é bidirecional: um cliente malicioso pode extrair memória de um servidor vulnerável, e um servidor malicioso (ou um MITM redirecionando um cliente) pode extrair memória de um cliente vulnerável — afetando VPNs, clientes de e-mail com STARTTLS, e qualquer aplicação que use libssl como cliente.

Exploração ativa em massa ocorreu nos dias seguintes à divulgação (abril de 2014); está no catálogo KEV da CISA, tem módulo Metasploit e múltiplas PoCs públicas (incluindo o script de Jared Stafford, referenciado em testes da época). O atacante não controla qual dado específico será retornado — o ataque é probabilístico, exigindo repetição para aumentar a chance de capturar segredos específicos como a chave privada RSA em uso.

Versions

Affected
OpenSSL 1.0.1 até 1.0.1f (inclusive) e 1.0.2-beta até 1.0.2-beta1.
Fixed in
OpenSSL 1.0.1g corrige o ramo 1.0.1; 1.0.2-beta2 corrige o ramo beta 1.0.2. Diversas distribuições fizeram backport do patch para pacotes derivados de versões anteriores (por exemplo, o pacote openssl 1.0.1e-2+deb7u5 do Debian incorporou a correção sem mudar o número de versão upstream).

How to protect

A correção definitiva é atualizar para OpenSSL 1.0.1g (ou 1.0.2-beta2 para o ramo beta). Após a atualização, os serviços que usam a biblioteca (Apache, Nginx, servidores de e-mail, VPNs, etc.) precisam ser reiniciados — a atualização do pacote OpenSSL por si só não corrige processos já em execução, que continuam usando a biblioteca vulnerável carregada em memória.

Caso a atualização não seja imediatamente possível, um paliativo real é recompilar o OpenSSL com a flag -DOPENSSL_NO_HEARTBEATS, desabilitando a extensão heartbeat inteiramente (custo: perda da funcionalidade de keep-alive do heartbeat, sem impacto funcional relevante na maioria dos casos, já que é usada primariamente para manter conexões DTLS vivas). Independentemente da via de correção, qualquer sistema exposto que estava rodando versão vulnerável deve ser tratado como comprometido: revogar e regerar certificados TLS, trocar chaves privadas, forçar reset de credenciais de usuários e invalidar sessões ativas — porque não há como provar retroativamente que a chave não foi extraída antes da correção.

Usar Perfect Forward Secrecy (PFS) reduz o dano de uma chave de sessão vazada (não permite decriptar tráfego passado capturado), mas não protege a chave privada do certificado nem tickets de sessão TLS já emitidos — não é substituto para a troca de chaves. Trocar apenas o certificado sem gerar um novo par de chaves não mitiga nada, já que a chave privada comprometida permanece a mesma.

How to detect

É possível detectar tentativas de exploração inspecionando o tráfego de rede: uma resposta de heartbeat (TLS record type 0x18) com tamanho declarado muito maior que o esperado para uma requisição legítima é o indicador central. Assinaturas Snort/Suricata publicadas na época (por exemplo, pela Fox-IT) comparam o tamanho do heartbeat de resposta contra faixas suspeitas (e.g., acima de 200 bytes até o limite de ~16KB por registro TLS) para sinalizar respostas anormalmente grandes.

Não há sinal confiável para detectar exploração retroativa antes da implantação dessas assinaturas — o ataque não deixa rastro no lado do servidor além do tráfego de rede em si (não gera erro de aplicação, não aparece em logs de aplicação), o que motivou a orientação de tratar qualquer serviço exposto como potencialmente comprometido, independentemente de haver evidência de ataque nos logs.

Researched and written with AI from the vendor advisory and public analysis, with the sources above. Always confirm the fixed version in the official advisory before acting.
The (1) TLS and (2) DTLS implementations in OpenSSL 1.0.1 before 1.0.1g do not properly handle Heartbeat Extension packets, which allows remote attackers to obtain sensitive information from process memory via crafted packets that trigger a buffer over-read, as demonstrated by reading private keys, related to d1_both.c and t1_lib.c, aka the Heartbleed bug.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Affected products
n/a · n/a
public PoCs found116 VexDay Proof
exploitdbVexDay Proofwww.exploit-db.com/exploits/32745exploitdbVexDay Proofwww.exploit-db.com/exploits/32998exploitdbVexDay Proofwww.exploit-db.com/exploits/32791exploitdbVexDay Proofwww.exploit-db.com/exploits/32764githubgithub.com/FiloSottile/Heartbleed2389githubgithub.com/musalbas/heartbleed-masstest572githubgithub.com/titanous/heartbleeder452githubgithub.com/Lekensteyn/pacemaker330githubgithub.com/sensepost/heartbleed-poc170githubgithub.com/einaros/heartbleed-tools98githubgithub.com/mpgn/heartbleed-PoC85githubgithub.com/isgroup/openmagic40githubgithub.com/jdauphant/patch-openssl-CVE-2014-016019githubgithub.com/DisK0nn3cT/MaltegoHeartbleed18githubgithub.com/hmlio/vaas-cve-2014-016015githubgithub.com/OffensivePython/HeartLeak15githubgithub.com/hybridus/heartbleedscanner11githubgithub.com/0x90/CVE-2014-01608githubgithub.com/DominikTo/bleed7githubgithub.com/0xinf0/bleeding_onions6githubgithub.com/hreese/heartbleed-dtls5githubgithub.com/anthophilee/A2SV--SSL-VUL-Scan5githubgithub.com/undacmic/heartbleed-proof-of-concept5githubgithub.com/yryz/heartbleed.js4githubgithub.com/mozilla-services/Heartbleed3githubgithub.com/ingochris/heartpatch.us3githubgithub.com/indrajeetmp11/Heartbleed-PoC-Exploit-Script2githubgithub.com/GardeniaWhite/fuzzing2githubgithub.com/cyphar/heartthreader2githubgithub.com/GuillermoEscobero/heartbleed2githubgithub.com/zouguangxian/heartbleed2githubgithub.com/pblittle/aws-suture2githubgithub.com/cheese-hub/heartbleed2githubgithub.com/waqasjamal-zz/HeartBleed-Vulnerability-Checker2githubgithub.com/amerine/coronary2githubgithub.com/sammyfung/openssl-heartbleed-fix1githubgithub.com/xanas/heartbleed.py1githubgithub.com/Saymeis/HeartBleed1githubgithub.com/vortextube/ssl_scanner1githubgithub.com/xlucas/heartbleed1githubgithub.com/Xyl2k/CVE-2014-0160-Chrome-Plugin1githubgithub.com/proactiveRISK/heartbleed-extention1githubgithub.com/belmind/heartbleed1githubgithub.com/22imer/CVE-2014-01600githubgithub.com/obayesshelton/CVE-2014-0160-Scanner0githubgithub.com/fb1h2s/CVE-2014-01600githubgithub.com/takeshixx/ssl-heartbleed.nse0githubgithub.com/roganartu/heartbleedchecker-chrome0githubgithub.com/ice-security88/CVE-2014-01600githubgithub.com/siddolo/knockbleed0githubgithub.com/a0726h77/heartbleed-test0githubgithub.com/idkqh7/heatbleeding0githubgithub.com/GeeksXtreme/ssl-heartbleed.nse0githubgithub.com/indiw0rm/-Heartbleed-0githubgithub.com/iSCInc/heartbleed0githubgithub.com/marstornado/cve-2014-0160-Yunfeng-Jiang0githubgithub.com/froyo75/Heartbleed_Dockerfile_with_Nginx0githubgithub.com/caiqiqi/OpenSSL-HeartBleed-CVE-2014-0160-PoC0githubgithub.com/cved-sources/cve-2014-01600githubgithub.com/artofscripting-zz/cmty-ssl-heartbleed-CVE-2014-0160-HTTP-HTTPS0githubgithub.com/tomdevman/heartbleed-bug0githubgithub.com/ThanHuuTuan/Heartexploit0githubgithub.com/rouze-d/heartbleed0githubgithub.com/WildfootW/CVE-2014-0160_OpenSSL_1.0.1f_Heartbleed0githubgithub.com/pierceoneill/bleeding-heart0githubgithub.com/h3x0v3rl0rd/CVE-2014-0160_Heartbleed0githubgithub.com/cbk914/heartbleed-checker0githubgithub.com/MrE-Fog/CVE-2014-0160-Chrome-Plugin0githubgithub.com/timsonner/cve-2014-0160-heartbleed0githubgithub.com/yashfren/CVE-2014-0160-HeartBleed0githubgithub.com/Shayhha/HeartbleedAttack0githubgithub.com/ArtemCyberLab/Project-Field-Analysis-and-Memory-Leak-Demonstration0githubgithub.com/SimoesCTT/CTT-HEARTBLEED-Temporal-Resonance-Memory-Leak-Exploit-Heartbleed-CVE-2014-01600githubgithub.com/0xBlackash/CVE-2014-01600githubgithub.com/Ryo-Soikutsu/Heartbleed0githubgithub.com/victoriacfigueiredo/heartbleed-lab0githubgithub.com/tungduongNT/CVE-2014-0160.0vulncheckvulncheck.com/xdb/3c96ba13f2b0unverifiedvulncheckvulncheck.com/xdb/e30f1c9ea953unverifiedvulncheckvulncheck.com/xdb/886614a9cf7funverifiedvulncheckvulncheck.com/xdb/e236a82d5676unverifiedvulncheckvulncheck.com/xdb/5caf3f40fb1dunverifiedvulncheckvulncheck.com/xdb/8311b472a11aunverifiedvulncheckvulncheck.com/xdb/16161c93e8deunverifiedcve_referencewww.exploit-db.com/exploits/32764unverifiedvulncheckvulncheck.com/xdb/52d2b5507e8eunverifiedvulncheckvulncheck.com/xdb/e57d9c60a44cunverifiedvulncheckvulncheck.com/xdb/bd1cb68e3a25unverifiedvulncheckvulncheck.com/xdb/9b3591a427cbunverifiedvulncheckvulncheck.com/xdb/875937ffc331unverifiedvulncheckvulncheck.com/xdb/8c8a7c8bd46cunverifiedvulncheckvulncheck.com/xdb/03d9bdcb45e0unverifiedvulncheckvulncheck.com/xdb/f9a7bb7f45e4unverifiedvulncheckvulncheck.com/xdb/fcbef4f6ba27unverifiedvulncheckvulncheck.com/xdb/2777a83a11fbunverifiedvulncheckvulncheck.com/xdb/f328891e9eacunverifiedcve_referencewww.exploit-db.com/exploits/32745unverifiedvulncheckvulncheck.com/xdb/a5f2ac732a33unverifiedvulncheckvulncheck.com/xdb/8a3b36c16af2unverifiedvulncheckvulncheck.com/xdb/db71d342ecf5unverifiedvulncheckvulncheck.com/xdb/f824571c8c19unverifiedvulncheckvulncheck.com/xdb/7c9998eeef71unverifiedvulncheckvulncheck.com/xdb/ced85a07daadunverifiedvulncheckvulncheck.com/xdb/f3c627ddd56cunverifiedvulncheckvulncheck.com/xdb/1c0f2aa2ac17unverifiedvulncheckvulncheck.com/xdb/878c4a2de132unverifiedvulncheckvulncheck.com/xdb/31863483ee4cunverifiedvulncheckvulncheck.com/xdb/a4ecbf735c2cunverifiedvulncheckvulncheck.com/xdb/279415eb9e6cunverifiedvulncheckvulncheck.com/xdb/8c74880acbb6unverifiedvulncheckvulncheck.com/xdb/31dbd59f952bunverifiedvulncheckvulncheck.com/xdb/051785dcdfd8unverifiedvulncheckvulncheck.com/xdb/dfa6c1616582unverifiedvulncheckvulncheck.com/xdb/6fd3881a18c4unverifiedvulncheckvulncheck.com/xdb/982bf0b4eb89unverifiedvulncheckvulncheck.com/xdb/180c504a4ab9unverified
⚠ Public resources, to assess the exposure of systems you control or are authorized to test. Test only with authorization.