CVE-2025-11187
JSON

6.1medium

Improper validation of PBMAC1 parameters in PKCS#12 MAC verification

Severity
6.1medium CVSS:3.1 by CISA-ADP
Exploit likelihood
7.45% (higher than 94% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
openssl

Description

Issue summary: PBMAC1 parameters in PKCS#12 files are missing validation which can trigger a stack-based buffer overflow, invalid pointer or NULL pointer dereference during MAC verification. Impact summary: The stack buffer overflow or NULL pointer dereference may cause a crash leading to Denial of Service for an application that parses untrusted PKCS#12 files. The buffer overflow may also potentially enable code execution depending on platform mitigations. When verifying a PKCS#12 file that uses PBMAC1 for the MAC, the PBKDF2 salt and keylength parameters from the file are used without validation. If the value of keylength exceeds the size of the fixed stack buffer used for the derived key (64 bytes), the key derivation will overflow the buffer. The overflow length is attacker-controlled. Also, if the salt parameter is not an OCTET STRING type this can lead to invalid or NULL pointer dereference. Exploiting this issue requires a user or application to process a maliciously crafted PKCS#12 file. It is uncommon to accept untrusted PKCS#12 files in applications as they are usually used to store private keys which are trusted by definition. For this reason the issue was assessed as Moderate severity. The FIPS modules in 3.6, 3.5 and 3.4 are not affected by this issue, as PKCS#12 processing is outside the OpenSSL FIPS module boundary. OpenSSL 3.6, 3.5 and 3.4 are vulnerable to this issue. OpenSSL 3.3, 3.0, 1.1.1 and 1.0.2 are not affected by this issue as they do not support PBMAC1 in PKCS#12.

Affected

Product or packageVersionsReported by
OpenSSL OpenSSLfrom 3.6.0 before 3.6.1, from 3.5.0 before 3.5.5, from 3.4.0 before 3.4.4CVE List, NVD

Classification

CWE-476CWE-787

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

Issue summary: PBMAC1 parameters in PKCS#12 files are missing validation which can trigger a stack-based buffer overflow, invalid pointer or NULL pointer dereference during MAC verification. Impact summary: The stack buffer overflow or NULL pointer dereference may cause a crash leading to Denial of Service for an application that parses untrusted PKCS#12 files. The buffer overflow may also potentially enable code execution depending on platform mitigations. When verifying a PKCS#12 file that uses PBMAC1 for the MAC, the PBKDF2 salt and keylength parameters from the file are used without validation. If the value of keylength exceeds the size of the fixed stack buffer used for the derived key (64 bytes), the key derivation will overflow the buffer. The overflow length is attacker-controlled. Also, if the salt parameter is not an OCTET STRING type this can lead to invalid or NULL pointer dereference. Exploiting this issue requires a user or application to process a maliciously crafted PKCS#12 file. It is uncommon to accept untrusted PKCS#12 files in applications as they are usually used to store private keys which are trusted by definition. For this reason the issue was assessed as Moderate severity. The FIPS modules in 3.6, 3.5 and 3.4 are not affected by this issue, as PKCS#12 processing is outside the OpenSSL FIPS module boundary. OpenSSL 3.6, 3.5 and 3.4 are vulnerable to this issue. OpenSSL 3.3, 3.0, 1.1.1 and 1.0.2 are not affected by this issue as they do not support PBMAC1 in PKCS#12.

NVD (es)

Resumen del problema: Los parámetros PBMAC1 en archivos PKCS#12 carecen de validación, lo que puede desencadenar un desbordamiento de búfer basado en pila, un puntero inválido o una desreferencia de puntero NULL durante la verificación MAC. Resumen del impacto: El desbordamiento de búfer de pila o la desreferencia de puntero NULL pueden causar un fallo que lleve a una denegación de servicio para una aplicación que analiza archivos PKCS#12 no confiables. El desbordamiento de búfer también puede potencialmente permitir la ejecución de código dependiendo de las mitigaciones de la plataforma. Al verificar un archivo PKCS#12 que utiliza PBMAC1 para el MAC, los parámetros de sal y longitud de clave (keylength) de PBKDF2 del archivo se utilizan sin validación. Si el valor de la longitud de clave (keylength) excede el tamaño del búfer de pila fijo utilizado para la clave derivada (64 bytes), la derivación de clave desbordará el búfer. La longitud del desbordamiento es controlada por el atacante. Además, si el parámetro de sal no es de tipo OCTET STRING, esto puede llevar a una desreferencia de puntero inválido o NULL. La explotación de este problema requiere que un usuario o aplicación procese un archivo PKCS#12 maliciosamente elaborado. Es poco común aceptar archivos PKCS#12 no confiables en aplicaciones, ya que generalmente se utilizan para almacenar claves privadas que son confiables por definición. Por esta razón, el problema fue evaluado como de severidad Moderada. Los módulos FIPS en 3.6, 3.5 y 3.4 no se ven afectados por este problema, ya que el procesamiento de PKCS#12 está fuera del límite del módulo FIPS de OpenSSL. OpenSSL 3.6, 3.5 y 3.4 son vulnerables a este problema. OpenSSL 3.3, 3.0, 1.1.1 y 1.0.2 no se ven afectados por este problema, ya que no soportan PBMAC1 en PKCS#12.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-11187 changed 2026-03-20CVE Terms of Use
NVDCVE-2025-11187 changed 2026-06-17Public domain