# CVE-2026-39855: osslsigncode has an Integer Underflow in PE Page Hash Calculation Can Cause Out-of-Bounds Read

- Severity: Medium 5.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2026-04-09T15:58:38.559Z
- Modified: 2026-10-26T22:10:00.163Z
- Weaknesses: CWE-125, CWE-190, CWE-191
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- mtrojnar osslsigncode: < 2.13
- osslsigncode_project osslsigncode: before 2.13

## References

- <https://github.com/mtrojnar/osslsigncode/security/advisories/GHSA-76vv-x5rr-q3mr> (patch, vendor-advisory)
- <https://github.com/mtrojnar/osslsigncode/commit/2a5409b7c4b6c6fad2b093531e8fea6cf08e1568> (patch)
- <https://github.com/mtrojnar/osslsigncode/releases/tag/2.13> (product, release-notes)

## Sources

- CVE List: [CVE-2026-39855](https://www.cve.org/CVERecord?id=CVE-2026-39855), CVE Terms of Use, modified 2026-04-09
- NVD: [CVE-2026-39855](https://nvd.nist.gov/vuln/detail/CVE-2026-39855), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-39855 · Whole record: https://cve.day/CVE-2026-39855.json · Rebuilt by cve.day 2026-11-25T22:59:18.383Z
