OpenSSL CMS AEAD IV stack overflow
- Product
- OpenSSL Project OpenSSL libcrypto (CMS / PKCS#7 parsing)
- CVE
- CVE-2025-15467
- Disclosed
- 2026-01-27
- CVSS
- 9.8
- Auth
- pre-auth
- CISA KEV
- no
- Affected
- OpenSSL 3.0.0-3.0.18, 3.3.0-3.3.5, 3.4.0-3.4.3, 3.5.0-3.5.4, 3.6.0 (EOL 3.1 and 3.2 are likely affected and unpatched). 1.1.1, 1.0.2 and the FIPS modules are not affected.
- Fixed
- 3.0.19, 3.3.6, 3.4.4, 3.5.5, 3.6.1
Summary
OpenSSL copies the IV from the ASN.1 parameters of a CMS (Auth)EnvelopedData message into a fixed-size stack buffer without checking its length. A crafted S/MIME or CMS message with an oversized AES-GCM IV overflows the stack while the message is being parsed, before any decryption or tag check, so the attacker needs no key. OpenSSL rated it High: a crash is reliable, and whether it becomes code execution depends on platform hardening.
Root cause
evp_cipher_get_asn1_aead_params() in crypto/evp/evp_lib.c, reached from CMS_decrypt() and related CMS parsing, copies the attacker-controlled IV length into a 16-byte stack buffer. The fix rejects IVs longer than EVP_MAX_IV_LENGTH. Aisle Research (Stanislav Fort) first reported the AuthEnvelopedData path. Pengutronix later showed that plain EnvelopedData is affected too.
Impact
A stack-based out-of-bounds write, triggered before authentication, in any process that parses untrusted CMS/PKCS#7 with AEAD ciphers, such as S/MIME mail gateways, encrypted-file handlers or `openssl cms -decrypt` pipelines. The result is a reliable DoS and possible RCE where stack canaries or other toolchain mitigations are missing. TLS handshakes do not reach this code.
Detection
Inventory libcrypto versions, including statically linked and vendored copies, and look for 3.x builds below the fixed releases. Find the services that call CMS_decrypt / SMIME_read_CMS / d2i_CMS on untrusted input. Watch for crashes (SIGSEGV or stack-smashing aborts) in S/MIME and CMS consumers, and for inbound CMS blobs whose GCM IV parameters are unusually long.
Mitigation
Upgrade to 3.0.19 / 3.3.6 / 3.4.4 / 3.5.5 / 3.6.1, or apply the distro backport, then restart the processes that load libcrypto. Move off EOL 3.1 / 3.2. Until patched, stop processing untrusted S/MIME / CMS EnvelopedData.