Security Vulnerability Report
中文
CVE-2026-39853 CVSS 7.8 HIGH

CVE-2026-39853

Published: 2026-04-09 16:16:31
Last Modified: 2026-04-17 20:03:46

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.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:osslsigncode_project:osslsigncode:*:*:*:*:*:*:*:* - VULNERABLE
osslsigncode < 2.12

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import sys # Conceptual PoC for CVE-2026-39853 # This script demonstrates the logic to create a malformed structure. # Exploitation requires crafting a PE/MSI/CAB file with a specific PKCS#7 signature. def create_malicious_digest(): # EVP_MAX_MD_SIZE is 64 bytes. Creating a digest larger than this triggers the overflow. overflow_size = 100 malicious_digest = b"A" * overflow_size return malicious_digest if __name__ == "__main__": payload = create_malicious_digest() print(f"[*] Generated payload size: {len(payload)} bytes") print("[*] To trigger the vulnerability, embed this payload in the SpcIndirectDataContent digest field of a signed file.") print("[*] Trigger command: osslsigncode verify malicious_file.signed")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-39853", "sourceIdentifier": "[email protected]", "published": "2026-04-09T16:16:31.233", "lastModified": "2026-04-17T20:03:45.763", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-121"}, {"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:osslsigncode_project:osslsigncode:*:*:*:*:*:*:*:*", "versionEndExcluding": "2.12", "matchCriteriaId": "99F63D36-1A36-4A6E-A2A3-02B68D5BA069"}]}]}], "references": [{"url": "https://github.com/mtrojnar/osslsigncode/commit/cbee1e723c5a8547302bd841ad9943ed8144db68", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/mtrojnar/osslsigncode/releases/tag/2.12", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/mtrojnar/osslsigncode/security/advisories/GHSA-hx87-8754-xvh4", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}