IM
IronMonkey Threat Research

CVE-2025-69419 HIGH

Published: 2026-01-27 | Last Modified: 2026-05-12 | Status: Modified

Description

Issue summary: Calling PKCS12_get_friendlyname() function on a maliciously crafted PKCS#12 file with a BMPString (UTF-16BE) friendly name containing non-ASCII BMP code point can trigger a one byte write before the allocated buffer. Impact summary: The out-of-bounds write can cause a memory corruption which can have various consequences including a Denial of Service. The OPENSSL_uni2utf8() function performs a two-pass conversion of a PKCS#12 BMPString (UTF-16BE) to UTF-8. In the second pass, when emitting UTF-8 bytes, the helper function bmp_to_utf8() incorrectly forwards the remaining UTF-16 source byte count as the destination buffer capacity to UTF8_putc(). For BMP code points above U+07FF, UTF-8 requires three bytes, but the forwarded capacity can be just two bytes. UTF8_putc() then returns -1, and this negative value is added to the output length without validation, causing the length to become negative. The subsequent trailing NUL byte is then written at a negative offset, causing write outside of heap allocated buffer. The vulnerability is reachable via the public PKCS12_get_friendlyname() API when parsing attacker-controlled PKCS#12 files. While PKCS12_parse() uses a different code path that avoids this issue, PKCS12_get_friendlyname() directly invokes the vulnerable function. Exploitation requires an attacker to provide a malicious PKCS#12 file to be parsed by the application and the attacker can just trigger a one zero byte write before the allocated buffer. For that reason the issue was assessed as Low severity according to our Security Policy. The FIPS modules in 3.6, 3.5, 3.4, 3.3 and 3.0 are not affected by this issue, as the PKCS#12 implementation is outside the OpenSSL FIPS module boundary. OpenSSL 3.6, 3.5, 3.4, 3.3, 3.0 and 1.1.1 are vulnerable to this issue. OpenSSL 1.0.2 is not affected by this issue.

Additional Descriptions (1)

Resumen del problema: Llamar a la función PKCS12_get_friendlyname() en un archivo PKCS#12 creado maliciosamente con un nombre descriptivo BMPString (UTF-16BE) que contiene un punto de código BMP no ASCII puede desencadenar una escritura de un byte antes del búfer asignado. Resumen del impacto: La escritura fuera de límites puede causar una corrupción de memoria que puede tener varias consecuencias, incluyendo una denegación de servicio. La función OPENSSL_uni2utf8() realiza una conversión en dos pasadas de un BMPString (UTF-16BE) de PKCS#12 a UTF-8. En la segunda pasada, al emitir bytes UTF-8, la función auxiliar bmp_to_utf8() reenvía incorrectamente el recuento de bytes fuente UTF-16 restantes como la capacidad del búfer de destino a UTF8_putc(). Para puntos de código BMP superiores a U+07FF, UTF-8 requiere tres bytes, pero la capacidad reenviada puede ser de solo dos bytes. UTF8_putc() luego devuelve -1, y este valor negativo se añade a la longitud de salida sin validación, haciendo que la longitud se vuelva negativa. El subsiguiente byte NUL final se escribe entonces en un desplazamiento negativo, causando una escritura fuera del búfer asignado en el heap. La vulnerabilidad es alcanzable a través de la API pública PKCS12_get_friendlyname() al analizar archivos PKCS#12 controlados por el atacante. Si bien PKCS12_parse() utiliza una ruta de código diferente que evita este problema, PKCS12_get_friendlyname() invoca directamente la función vulnerable. La explotación requiere que un atacante proporcione un archivo PKCS#12 malicioso para ser analizado por la aplicación y el atacante puede simplemente desencadenar una escritura de un byte cero antes del búfer asignado. Por esa razón, el problema fue evaluado como de baja severidad según nuestra Política de Seguridad. Los 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 PKCS#12 está fuera del límite del módulo FIPS de OpenSSL. OpenSSL 3.6, 3.5, 3.4, 3.3, 3.0 y 1.1.1 son vulnerables a este problema. OpenSSL 1.0.2 no se ve afectado por este problema.

CVSS Metrics

Base Score: 7.4 (HIGH)

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

Attack VectorNETWORK
Attack ComplexityHIGH
Privileges RequiredNONE
User InteractionNONE
ScopeUNCHANGED
Confidentiality ImpactHIGH
Integrity ImpactHIGH
Availability ImpactNONE

Source: 134c704f-9b21-4f2e-91b3-4a467353bcc0

Type: Secondary

Exploitability Score: 2.2

Impact Score: 5.2

Weaknesses

Source Type Description
[email protected] Secondary
en CWE-787

Affected Products

Vendor Product Version Update Type
openssl openssl * <built-in method update of dict object at 0x7fd3846446c0> Application
openssl openssl * <built-in method update of dict object at 0x7fd37019d680> Application
openssl openssl * <built-in method update of dict object at 0x7fd37019d580> Application
openssl openssl * <built-in method update of dict object at 0x7fd37019dc00> Application
openssl openssl * <built-in method update of dict object at 0x7fd384644b80> Application
openssl openssl * <built-in method update of dict object at 0x7fd384646980> Application

Affected Configurations

Operator: OR

Vulnerable CPE
Yes cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*
Yes cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*
Yes cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*
Yes cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*
Yes cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*
Yes cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*