OpenSSL RSA KEM (RSASVE) can return 'success' on failed encryption
OpenSSL's April 2026 advisory fixed CVE-2026-31790 (moderate): when an application derives a shared secret with EVP_PKEY_encapsulate() using RSA/RSASVE and an attacker-supplied, unvalidated RSA public key, a failed RSA encryption could still be reported as successful, so the caller would send stale or uninitialized buffer contents to the peer as the 'ciphertext'. Reported by Simo Sorce (Red Hat).
Broken implementation. The underlying math is not broken by this. The failure is in code, hardware, or how the primitive is used.
Background
This is a straightforward error-handling bug in one library's RSA key-encapsulation path, exploitable only by a malicious peer controlling the public key, and only when the application skips public-key validation. It leaks memory contents rather than breaking RSA. Included as the most notable RSA-specific library bug of 2026 to date; fixed in OpenSSL 3.0.20, 3.3.7, 3.4.5, 3.5.6 and 3.6.2.
Sources
- announcementOpenSSL vulnerabilities: CVE-2026-31790, Incorrect Failure Handling in RSA KEM RSASVE EncapsulationOpenSSL, openssl-library.org
- cveCVE-2026-31790Red Hat, access.redhat.com