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.
Published: 2026-07-14
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

History

Sat, 01 Aug 2026 10:30:00 +0000

Type Values Removed Values Added
Title Heap-Based Out-of-Bounds Write in OpenHTJ2K Causing Process Termination

Tue, 28 Jul 2026 09:30:00 +0000

Type Values Removed Values Added
Title Heap-Based Out-of-Bounds Write in OpenHTJ2K Causing Process Termination

Sun, 26 Jul 2026 12:30:00 +0000

Type Values Removed Values Added
Title Heap-based Out-of-Bounds Write in OpenHTJ2K Leading to Process Termination

Thu, 23 Jul 2026 04:00:00 +0000

Type Values Removed Values Added
Title Heap-based Out-of-Bounds Write in OpenHTJ2K Leading to Process Termination

Fri, 17 Jul 2026 23:30:00 +0000

Type Values Removed Values Added
Title Buffer Overflow in OpenHTJ2K’s JPEG 2000 Precinct Subband Parsing Allows Arbitrary Code Execution

Fri, 17 Jul 2026 15:30:00 +0000

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

Thu, 16 Jul 2026 08:15:00 +0000

Type Values Removed Values Added
Title Buffer Overflow in OpenHTJ2K’s JPEG 2000 Precinct Subband Parsing Allows Arbitrary Code Execution

Wed, 15 Jul 2026 14:30:00 +0000

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'}


Tue, 14 Jul 2026 22:45:00 +0000

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.

cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-07-17T15:02:40.362Z

Reserved: 2026-06-08T00:00:00.000Z

Link: CVE-2026-51807

cve-icon Vulnrichment

Updated: 2026-07-15T14:08:07.304Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T10:15:03Z

Weaknesses
  • CWE-121

    Stack-based Buffer Overflow