RSA Key Exchange Padding Oracle (ROBOT)

The service's handling of RSA key exchange reveals whether decrypted data was correctly padded, giving attackers an oracle to decrypt recorded sessions or sign as the server.

SeverityMedium
CVSS 3.15.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N Open in the calculator
CVSS 4.08.2 CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-203: Observable Discrepancy
MITRE ATT&CKT1040 Network Sniffing, T1557 Adversary-in-the-Middle
CategoryCryptographic Failures

Description

The service supports TLS cipher suites that use RSA key exchange, and its TLS implementation responds differently, through a different alert, a closed connection, a timeout or a difference in timing, depending on whether the client's encrypted key exchange message is correctly padded under PKCS #1 v1.5. This difference acts as an oracle for the adaptive chosen-ciphertext attack described by Daniel Bleichenbacher in 1998: by sending many modified versions of a captured message and observing the responses, an attacker can perform operations with the server's RSA private key without ever obtaining the key itself.

An attacker who has recorded a session that used RSA key exchange can use the oracle to decrypt it, exposing credentials, session tokens and data, provided they can send the large number of queries the attack needs to the live server. The same oracle can in principle be used to create a signature with the server's key and so impersonate it, but this is much harder to complete within the time limits of a live connection. Sessions that used ECDHE key exchange cannot be decrypted this way.

The TLS standards have required implementations to hide this difference since soon after the attack was published, but in 2017 the ROBOT research (Return Of Bleichenbacher's Oracle Threat) found the flaw again in products from several major vendors, including load balancers, firewalls and TLS libraries, each of which issued its own advisory and CVE identifier. Testing distinguishes a strong oracle, which needs relatively few queries to exploit, from a weak one, which needs many more; the exposure is greatest where clients commonly negotiate RSA key exchange and the oracle is strong.

The issue is identified with the researchers' robot-detect tool, testssl.sh or vulnerability scanners. It affects only servers that accept RSA key exchange suites (TLS_RSA_WITH_...); TLS 1.3 removed RSA key exchange entirely.

Remediation

Remove the oracle, and preferably RSA key exchange altogether:

  • Apply the vendor's fix for the affected product, as listed in its ROBOT advisory, then restart or reload the TLS service.
  • Disable all cipher suites that use RSA key exchange (TLS_RSA_WITH_...) and keep the ECDHE suites, which also provide forward secrecy. In OpenSSL cipher strings, !kRSA removes them; on Windows, use Group Policy (SSL Cipher Suite Order) or the Disable-TlsCipherSuite cmdlet; on load balancers, select a cipher profile without them.
  • Enable TLS 1.3, which does not use RSA key exchange.
  • Where a product has no fix and RSA key exchange cannot be removed, restrict the service to trusted networks until it can be upgraded or replaced.

Confirm the fix by repeating the ROBOT test and checking that no TLS_RSA_WITH_... suite is accepted.

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