osslsigncode has an Integer Underflow in PE Page Hash Calculation Can Cause Out-of-Bounds Read
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-125 and the CVSS impact.
Summary
osslsigncode is a tool that implements Authenticode signing and timestamping. Prior to 2.13, an integer underflow vulnerability exists in osslsigncode version 2.12 and earlier in the PE page-hash computation code (pe_page_hash_calc()). When page hash processing is performed on a PE file, the function subtracts hdrsize from pagesize without first validating that pagesize >= hdrsize. If a malicious PE file sets SizeOfHeaders (hdrsize) larger than SectionAlignment (pagesize), the subtraction underflows and produces a very large unsigned length. The code allocates a zero-filled buffer of pagesize bytes and then attempts to hash pagesize - hdrsize bytes from that buffer. After the underflow, this results in an out-of-bounds read from the heap and can crash the process. The vulnerability can be triggered while signing a malicious PE file with page hashing enabled (-ph), or while verifying a malicious signed PE file that already contains page hashes. Verification of an already signed file does not require the verifier to pass -ph. This vulnerability is fixed in 2.13.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
- Fix · CNA osslsigncode (mtrojnar) Fixed in 2.13
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-39855
References
More mtrojnar Osslsigncode vulnerabilities
- TI-2025-43157 An issue in mtrojnar Osslsigncode affected at v2.10 and before allows a remote attacker… CVSS 3.1CRITICAL 9.8
- TI-2023-18242 Buffer Overflow vulnerability in mtrojnar osslsigncode v.2.3 and before allows a local… CVSS 3.1HIGH 7.8
- TI-2026-28735 osslsigncode has a Stack Buffer Overflow via Unbounded Digest Copy During Signature Verification CVSS 3.1HIGH 7.8
- TI-2026-28737 osslsigncode has an Out-of-Bounds Read via Unvalidated Section Bounds in PE Page Hash Calculation CVSS 3.1MEDIUM 5.5
Sources
- CVE-2026-39855 · CVE Program
- CVE-2026-39855 · NVD
- FIRST EPSS
- CVE-2026-39855 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences