CVE-2026-39853
JSON

7.8high

osslsigncode has a Stack Buffer Overflow via Unbounded Digest Copy During Signature Verification

Severity
7.8high CVSS:3.1 by GitHub_M
Exploit likelihood
0.25% (higher than 10% of CVEs)
Published
Last changed
Assigned by
GitHub_M

Description

osslsigncode is a tool that implements Authenticode signing and timestamping. Prior to 2.12, A stack buffer overflow vulnerability exists in osslsigncode in several signature verification paths. During verification of a PKCS#7 signature, the code copies the digest value from a parsed SpcIndirectDataContent structure into a fixed-size stack buffer (mdbuf[EVP_MAX_MD_SIZE], 64 bytes) without validating that the source length fits within the destination buffer. This pattern is present in the verification handlers for PE, MSI, CAB, and script files. An attacker can craft a malicious signed file with an oversized digest field in SpcIndirectDataContent. When a user verifies such a file with osslsigncode verify, the unbounded memcpy can overflow the stack buffer and corrupt adjacent stack state. This vulnerability is fixed in 2.12.

Affected

Product or packageVersionsReported by
mtrojnar osslsigncode< 2.12CVE List
osslsigncode_project osslsigncodebefore 2.12NVD

Classification

CWE-121CWE-787

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

What each source says

CVE List

osslsigncode is a tool that implements Authenticode signing and timestamping. Prior to 2.12, A stack buffer overflow vulnerability exists in osslsigncode in several signature verification paths. During verification of a PKCS#7 signature, the code copies the digest value from a parsed SpcIndirectDataContent structure into a fixed-size stack buffer (mdbuf[EVP_MAX_MD_SIZE], 64 bytes) without validating that the source length fits within the destination buffer. This pattern is present in the verification handlers for PE, MSI, CAB, and script files. An attacker can craft a malicious signed file with an oversized digest field in SpcIndirectDataContent. When a user verifies such a file with osslsigncode verify, the unbounded memcpy can overflow the stack buffer and corrupt adjacent stack state. This vulnerability is fixed in 2.12.

NVD (es)

osslsigncode es una herramienta que implementa la firma y el sellado de tiempo Authenticode. Anterior a la 2.12, existe una vulnerabilidad de desbordamiento de búfer de pila en osslsigncode en varias rutas de verificación de firma. Durante la verificación de una firma PKCS#7, el código copia el valor de resumen de una estructura SpcIndirectDataContent analizada en un búfer de pila de tamaño fijo (mdbuf[EVP_MAX_MD_SIZE], 64 bytes) sin validar que la longitud de origen encaje dentro del búfer de destino. Este patrón está presente en los manejadores de verificación para archivos PE, MSI, CAB y de script. Un atacante puede crear un archivo firmado malicioso con un campo de resumen sobredimensionado en SpcIndirectDataContent. Cuando un usuario verifica dicho archivo con osslsigncode verify, el memcpy sin límites puede desbordar el búfer de pila y corromper el estado de pila adyacente. Esta vulnerabilidad está corregida en la 2.12.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-39853 changed 2026-04-09CVE Terms of Use
NVDCVE-2026-39853 changed 2026-10-26Public domain