Skip to main content
Vulnerability Database/CVE-2026-111151

CVE-2026-111151: OpenJPH HTJ2K Buffer Overflow Vulnerability

CVE-2026-111151 is a heap buffer overflow in OpenJPH HTJ2K decoder that enables memory corruption through crafted codestreams. This vulnerability affects versions through 0.32.0 and can lead to crashes and potential code execution. This post covers technical details, affected versions, impact analysis, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-111151 Overview

CVE-2026-111151 is a heap out-of-bounds write vulnerability in OpenJPH through version 0.32.0. The flaw resides in the High Throughput JPEG 2000 (HTJ2K) cleanup-pass decoder and is triggered when processing one-row codeblocks. Attackers can craft a malicious .j2c or .jph codestream with small precinct sizes to force the decoder to write a second row past the codeblock buffer. This writes memory corruption and can crash the host application. The weakness is classified under CWE-787 (Out-of-bounds Write).

Critical Impact

Processing a crafted HTJ2K codestream corrupts heap memory in the decoder, enabling denial of service and potentially further exploitation of applications that embed OpenJPH.

Affected Products

  • OpenJPH versions up to and including 0.32.0
  • Applications and libraries that embed the OpenJPH HTJ2K decoder
  • Image processing pipelines consuming .j2c or .jph codestreams via OpenJPH

Discovery Timeline

  • 2026-10-15 - CVE-2026-111151 published to the National Vulnerability Database
  • 2026-10-16 - Entry last updated in NVD

Technical Details for CVE-2026-111151

Vulnerability Analysis

OpenJPH implements the HTJ2K cleanup-pass decoder in ojph_block_decoder32.cpp. The decoder assumes that codeblocks contain at least two rows of samples when it emits output during the cleanup pass. When a codestream specifies very small precinct sizes, the resulting codeblock geometry collapses to a single row. The decoder still proceeds to write a second row of samples, pushing output past the end of the allocated codeblock buffer on the heap.

The downstream effect is heap memory corruption adjacent to the codeblock allocation. In the best case the process crashes, denying service to the host application. In embedded contexts such as viewers, converters, or server-side image pipelines, this corruption can be reached without authentication by supplying an image file. See the VulnCheck advisory and the HackMD analysis for the full write-up.

Root Cause

The root cause is a missing boundary check on codeblock height during the HTJ2K cleanup pass. The decoder in ojph_block_decoder32.cpp writes two rows unconditionally, while allocation logic in ojph_codeblock.cpp and ojph_subband.cpp permits one-row codeblocks when precinct sizes are small. The second-row write therefore exceeds the buffer by one row of samples.

Attack Vector

Exploitation is local and requires user interaction. An attacker crafts a .j2c or .jph file that declares small precinct dimensions producing a one-row codeblock in at least one subband. When a user opens or converts the file with an OpenJPH-backed tool, the cleanup-pass decoder writes past the buffer. No authentication is required, and the attack succeeds against default build configurations of OpenJPH 0.32.0 and earlier.

No verified proof-of-concept code is published in the referenced advisories. See the external HackMD and VulnCheck write-ups for codestream construction details.

Detection Methods for CVE-2026-111151

Indicators of Compromise

  • Unexpected crashes or heap corruption diagnostics in processes that link OpenJPH when handling .j2c or .jph files
  • .j2c or .jph files declaring unusually small precinct sizes that collapse codeblocks to a single row
  • AddressSanitizer or heap allocator reports flagging out-of-bounds writes in ojph_block_decoder32

Detection Strategies

  • Inspect inbound image uploads for HTJ2K codestreams and parse precinct and codeblock parameters before passing them to OpenJPH
  • Run OpenJPH-based decoding workloads under AddressSanitizer or hardened allocators in staging to surface boundary violations
  • Correlate application crash telemetry with recent reads of .j2c or .jph files to identify targeted exploitation attempts

Monitoring Recommendations

  • Log and alert on repeated decoder crashes in services that consume JPEG 2000 or HTJ2K content
  • Monitor file-ingestion pipelines for anomalous JPEG 2000 file structures and small precinct declarations
  • Track OpenJPH version inventory across build artifacts and container images to identify exposed hosts

How to Mitigate CVE-2026-111151

Immediate Actions Required

  • Identify every application and container image that links OpenJPH 0.32.0 or earlier and prioritize those exposed to untrusted input
  • Restrict ingestion of .j2c and .jph files from untrusted sources until a patched build is deployed
  • Isolate decoder workloads in sandboxed processes with minimal privileges to contain heap corruption

Patch Information

At the time of publication, no fixed release version is listed in the referenced advisories. Monitor the OpenJPH GitHub repository for a patched release and rebuild downstream artifacts once the fix is merged. The VulnCheck advisory tracks remediation status.

Workarounds

  • Reject HTJ2K codestreams whose precinct parameters produce codeblocks with fewer than two rows during pre-decode validation
  • Run OpenJPH inside a sandbox or container with strict seccomp and memory limits to contain heap corruption
  • Disable HTJ2K decoding paths in integrating applications where JPEG 2000 support is not required

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.