# CVE-2026-51807: Heap-based out-of-bounds write in j2kprecinctsubband::parsepacketheader() in OpenHTJ2K versions 0.18.3 and earlier (fixed in v0.18.4) cause…

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/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.37%, higher than 33% of CVEs (2026-12-01)
- Published: 2026-07-14T00:00:00.000Z
- Modified: 2026-07-17T16:17:15.513Z
- Weaknesses: CWE-121
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: mitre

## Description

Heap-based out-of-bounds write in j2k_precinct_subband::parse_packet_header() in OpenHTJ2K versions 0.18.3 and earlier (fixed in v0.18.4) caused by missing bounds validation before coding-pass lengths are written to j2k_codeblock::pass_length[128]. A crafted JPEG 2000 codestream containing malformed PPM packet headers can trigger a heap-based out-of-bounds write in j2k_precinct_subband::parse_packet_header() in source/core/coding/coding_units.cpp due to missing bounds validation for the j2k_codeblock::pass_length[128] array which can lead to heap corruption and process termination.

(As written by CVE List.)

## Affected

- Unspecified product: n/a

## References

- <https://github.com/osamu620/OpenHTJ2K/commit/0778b93>
- <https://github.com/osamu620/OpenHTJ2K/blob/main/CHANGELOG>
- <https://github.com/osamu620/OpenHTJ2K/releases>
- <https://github.com/osamu620/OpenHTJ2K/compare/0778b93...v0.18.4>

## Sources

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

---

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