{"id":"CVE-2026-31790","aliases":["CVE-2026-31790"],"related":[],"kind":"vulnerability","state":"published","title":"Incorrect Failure Handling in RSA KEM RSASVE Encapsulation","summary":"Issue summary: Applications using RSASVE key encapsulation to establish\na secret encryption key can send contents of an uninitialized memory buffer to\na malicious peer.\n\nImpact summary: The uninitialized buffer might contain sensitive data from the\nprevious execution of the application process which leads to sensitive data\nleakage to an attacker.\n\nRSA_public_encrypt() returns the number of bytes written on success and -1\non error. The affected code tests only whether the return value is non-zero.\nAs a result, if RSA encryption fails, encapsulation can still return success to\nthe caller, set the output lengths, and leave the caller to use the contents of\nthe ciphertext buffer as if a valid KEM ciphertext had been produced.\n\nIf applications use EVP_PKEY_encapsulate() with RSA/RSASVE on an\nattacker-supplied invalid RSA public key without first validating that key,\nthen this may cause stale or uninitialized contents of the caller-provided\nciphertext buffer to be disclosed to the attacker in place of the KEM\nciphertext.\n\nAs a workaround calling EVP_PKEY_public_check() or\nEVP_PKEY_public_check_quick() before EVP_PKEY_encapsulate() will mitigate\nthe issue.\n\nThe FIPS modules in 3.6, 3.5, 3.4, 3.3, 3.1 and 3.0 are affected by this issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Issue summary: Applications using RSASVE key encapsulation to establish\na secret encryption key can send contents of an uninitialized memory buffer to\na malicious peer.\n\nImpact summary: The uninitialized buffer might contain sensitive data from the\nprevious execution of the application process which leads to sensitive data\nleakage to an attacker.\n\nRSA_public_encrypt() returns the number of bytes written on success and -1\non error. The affected code tests only whether the return value is non-zero.\nAs a result, if RSA encryption fails, encapsulation can still return success to\nthe caller, set the output lengths, and leave the caller to use the contents of\nthe ciphertext buffer as if a valid KEM ciphertext had been produced.\n\nIf applications use EVP_PKEY_encapsulate() with RSA/RSASVE on an\nattacker-supplied invalid RSA public key without first validating that key,\nthen this may cause stale or uninitialized contents of the caller-provided\nciphertext buffer to be disclosed to the attacker in place of the KEM\nciphertext.\n\nAs a workaround calling EVP_PKEY_public_check() or\nEVP_PKEY_public_check_quick() before EVP_PKEY_encapsulate() will mitigate\nthe issue.\n\nThe FIPS modules in 3.6, 3.5, 3.4, 3.3, 3.1 and 3.0 are affected by this issue.","source":"cvelist"},{"lang":"es","text":"Resumen del problema: Las aplicaciones que utilizan la encapsulación de clave RSASVE para establecer una clave de cifrado secreta pueden enviar el contenido de un búfer de memoria no inicializado a un par malicioso.\n\nResumen del impacto: El búfer no inicializado podría contener datos sensibles de la ejecución anterior del proceso de la aplicación, lo que lleva a la fuga de datos sensibles a un atacante.\n\nRSA_public_encrypt() devuelve el número de bytes escritos en caso de éxito y -1 en caso de error. El código afectado solo prueba si el valor de retorno no es cero. Como resultado, si el cifrado RSA falla, la encapsulación aún puede devolver éxito al llamador, establecer las longitudes de salida y dejar que el llamador use el contenido del búfer de texto cifrado como si se hubiera producido un texto cifrado KEM válido.\n\nSi las aplicaciones usan EVP_PKEY_encapsulate() con RSA/RSASVE en una clave pública RSA inválida proporcionada por un atacante sin validar primero esa clave, entonces esto puede causar que el contenido obsoleto o no inicializado del búfer de texto cifrado proporcionado por el llamador sea divulgado al atacante en lugar del texto cifrado KEM.\n\nComo solución alternativa, llamar a EVP_PKEY_public_check() o EVP_PKEY_public_check_quick() antes de EVP_PKEY_encapsulate() mitigará el problema.\n\nLos módulos FIPS en 3.6, 3.5, 3.4, 3.3, 3.1 y 3.0 se ven afectados por este problema.","source":"nvd"}],"published":"2026-04-07T22:00:56.698Z","modified":"2026-07-24T23:10:00.563Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-754"],"affected":[{"ranges":[{"type":"semver","introduced":"3.6.0","fixed":"3.6.2","status":"affected"},{"type":"semver","introduced":"3.5.0","fixed":"3.5.6","status":"affected"},{"type":"semver","introduced":"3.4.0","fixed":"3.4.5","status":"affected"},{"type":"semver","introduced":"3.3.0","fixed":"3.3.7","status":"affected"},{"type":"semver","introduced":"3.0.0","fixed":"3.0.20","status":"affected"}],"vendor":"OpenSSL","product":"OpenSSL","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.0.0","fixed":"3.0.20"},{"status":"affected","introduced":"3.3.0","fixed":"3.3.7"},{"status":"affected","introduced":"3.4.0","fixed":"3.4.5"},{"status":"affected","introduced":"3.5.0","fixed":"3.5.6"},{"status":"affected","introduced":"3.6.0","fixed":"3.6.2"}],"vendor":"openssl","product":"openssl","cpe":"cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://openssl-library.org/news/secadv/20260407.txt","tags":["vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/openssl/openssl/commit/abd8b2eec7e3f3fda60ecfb68498b246b52af482","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/openssl/openssl/commit/001e01db3e996e13ffc72386fe79d03a6683b5ac","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/openssl/openssl/commit/d5f8e71cd0a54e961d0c3b174348f8308486f790","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/openssl/openssl/commit/b922e24e5b23ffb9cb9e14cadff23d91e9f7e406","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/openssl/openssl/commit/eed200f58cd8645ed77e46b7e9f764e284df379e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html","tags":[],"sources":["cvelist","nvd"]}],"credits":["Simo Sorce (Red Hat)","Nikola Pajkovsky"],"assigner":"openssl","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-04-08T14:32:04.700Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31790","url":"https://www.cve.org/CVERecord?id=CVE-2026-31790","licence":"CVE Terms of Use","modified":"2026-05-12T12:09:06.208Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31790","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31790","licence":"Public domain","modified":"2026-07-24T23:10:00.563Z"}],"updatedAt":"2026-11-25T22:59:18.181Z","epss":{"score":0.01049,"percentile":0.65166,"date":"2026-12-01T12:00:22.000Z"}}