CVE-2026-51807

Published Jul 14, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A heap‑based out‑of‑bounds write occurs in OpenHTJ2K’s parse_packet_header function when handling JPEG 2000 codestreams. Malformed PPM packet headers allow an attacker to write length values beyond the bounds of a 128‑element array, corrupting adjacent heap memory and resulting in process termination. The flaw is classified as CWE‑121 and results in service disruption, with no assertion of further exploitation in the supplied description.

Affected Systems

The vulnerability affects OpenHTJ2K versions 0.18.3 and earlier. Any application, library, or tool that incorporates these releases and processes external JPEG 2000 content is potentially impacted. Since the project is hosted on GitHub and no commercial vendor is listed, deployments that embed the vulnerable code are at risk.

Risk and Exploitability

The CVSS score of 9.8 marks this flaw as Extremely Critical, while the EPSS score of <1% indicates a low but non‑zero likelihood of exploitation. The vulnerability is not listed in the CISA KEV catalog. Based on the description, the likely attack vector is a crafted JPEG 2000 file processed by the vulnerable code, which may be delivered via network or local filesystem. No public exploits are known at this time, but the high severity warrants immediate action.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade OpenHTJ2K to version 0.18.4 or later, where the bounds check has been added.
  • If an upgrade is not immediately possible, rebuild the library from the latest source commit that omits the vulnerable parse_packet_header implementation.
  • Validate or sanitize all JPEG 2000 input before decoding, and restrict usage of the library to trusted or internally controlled data sources.

Generated by OpenCVE AI on August 1, 2026 at 10:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Title Heap-Based Out-of-Bounds Write in OpenHTJ2K Causing Process Termination
Type Values Removed Values Added
Title Heap-Based Out-of-Bounds Write in OpenHTJ2K Causing Process Termination
Type Values Removed Values Added
Title Heap-based Out-of-Bounds Write in OpenHTJ2K Leading to Process Termination
Type Values Removed Values Added
Title Heap-based Out-of-Bounds Write in OpenHTJ2K Leading to Process Termination
Type Values Removed Values Added
Title Buffer Overflow in OpenHTJ2K’s JPEG 2000 Precinct Subband Parsing Allows Arbitrary Code Execution
Type Values Removed Values Added
Description Buffer Overflow vulnerability in OpenHTJ2K v.0.18.4 and before allows an attacker to execute arbitrary code via the j2k_precinct_subband::parse_packet_header() in source/core/coding/coding_units.cpp 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.
References
Type Values Removed Values Added
Title Buffer Overflow in OpenHTJ2K’s JPEG 2000 Precinct Subband Parsing Allows Arbitrary Code Execution
Type Values Removed Values Added
Weaknesses CWE-121
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Buffer Overflow vulnerability in OpenHTJ2K v.0.18.4 and before allows an attacker to execute arbitrary code via the j2k_precinct_subband::parse_packet_header() in source/core/coding/coding_units.cpp
References

Subscriptions

No data.

Weaknesses
  • CWE-121

    Stack-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Jul 17, 2026, 3:02 PM
Reserved
Jun 8, 2026, 12:00 AM
Status
Deferred
Published
Jul 14, 2026, 11:17 PM
Modified
Jul 17, 2026, 4:17 PM