OpenSSL Heartbleed (CVE-2014-0160)

The service uses an OpenSSL version vulnerable to Heartbleed, which lets anyone read chunks of the server's memory, including private keys, passwords and session data.

SeverityHigh
CVSS 3.17.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N Open in the calculator
CVSS 4.08.7 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-130: Improper Handling of Length Parameter Inconsistency
MITRE ATT&CKT1212 Exploitation for Credential Access, T1190 Exploit Public-Facing Application
CVECVE-2014-0160
CategoryOutdated Components

Description

The service uses a version of OpenSSL affected by Heartbleed (CVE-2014-0160): the 1.0.1 series before 1.0.1g, and 1.0.2 beta 1. The flaw is in OpenSSL's handling of the TLS and DTLS heartbeat extension. A heartbeat request carries a payload and a field stating its length, which the vulnerable code trusts without checking it against the data actually received, so a request claiming a long payload causes the server to return up to about 64 KB of its process memory in the reply.

The attack needs no authentication, can come from anywhere on the network, and can be repeated as often as the attacker likes to read different areas of memory. That memory may contain the server's private TLS key, user names and passwords, session cookies, and the contents of other users' requests and responses. With the private key, the attacker can impersonate the service and decrypt recorded traffic that used RSA key exchange; with session cookies or passwords, they can take over user accounts. Because exploitation leaves no trace in normal application logs, any secret that passed through a vulnerable service must be treated as possibly exposed.

The flaw affects any software built on a vulnerable OpenSSL, not only web servers: mail and VPN servers, appliances and embedded devices, and also clients, whose memory a malicious server can read in the same way. Statically linked or bundled copies of OpenSSL are easily missed when the operating system's own package is updated.

The vulnerability can be confirmed without disrupting the service using Nmap's ssl-heartbleed script, testssl.sh or vulnerability scanners, which send a malformed heartbeat and check whether extra memory is returned.

Remediation

Upgrade OpenSSL and replace any secret that may have been exposed:

  • Upgrade to a currently supported OpenSSL release from the operating system vendor or the OpenSSL project; the 1.0.1 series has long been out of support. Restart every service that uses the library, and update software and appliances that bundle their own copy through the vendor's patches or firmware.
  • Generate new private keys, obtain new certificates for them, and revoke the old certificates, as the old keys may have been read.
  • Invalidate active sessions and tokens, and require password changes for accounts that used the service while it was vulnerable, along with any other credentials or API keys that passed through it.
  • Review the host's other components, as a system this far behind on OpenSSL updates usually has other unpatched software.

Where an upgrade cannot be made at once, OpenSSL can be rebuilt without the heartbeat extension (the -DOPENSSL_NO_HEARTBEATS compile option), or the service can be restricted to trusted networks. Confirm the fix by repeating the Heartbleed check and confirming the OpenSSL version in use.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More TLS and Certificates Findings

Every TLS and Certificates finding