Skip to main content

OpenHTJ2K CVE-2026-51807

| EUVDEUVD-2026-44580 CRITICAL
Stack-based Buffer Overflow (CWE-121)
2026-07-14 cve@mitre.org GHSA-hr36-79f7-75x7
9.8
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious JPEG 2000 file
  2. Delivery
    Deliver to app using OpenHTJ2K
  3. Exploit
    Decoder parses packet header
  4. Execution
    num_passes exceeds pass_length[128]
  5. Persist
    Overflow corrupts adjacent memory
  6. Impact
    Potential arbitrary code execution

Vulnerability Assessment

Weakness
CWE
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target to parse an attacker-controlled JPEG 2000 / HTJ2K codestream with OpenHTJ2K 0.18.4 or earlier; specifically, the crafted packet header must declare a coding-pass total for a codeblock that exceeds the 128-entry pass_length[] array so that j2k_precinct_subband::parse_packet_header() accumulates block->num_passes beyond the bound. The limiting factor is that the vulnerable code only runs during decode, so an application or pipeline must actually ingest the malicious image - in interactive tools this implies user interaction (opening/submitting a file), while automated server-side conversion pipelines meet the no-interaction assumption in the published vector. No authentication is required by the code path itself (PR:N per CVSS), and no non-default configuration is needed - any use of the affected decode function on untrusted input is exposed.

Impact

The published CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H = 9.8 critical) treats this as a remote, unauthenticated, no-interaction network flaw, and CISA SSVC confirms the technical impact is total and the issue is automatable. However, these signals conflict with the nature of the code: this is an image/codestream parser, so real-world exploitation requires the victim application to actually process an attacker-supplied JPEG 2000 file - closer to UI:R (user opens/submits a file) unless the library sits behind an automated server-side ingestion pipeline, in which case UI:N is justified. That distinction is why the raw metrics look worse than the practical risk for most deployments. Counterbalancing the 9.8 score, EPSS is only 0.20% (10th percentile), there is no CISA KEV listing and no public exploit identified at time of analysis, and SSVC exploitation status is 'none.' Net: a genuinely high-severity memory-corruption bug worth patching, but not a confirmed in-the-wild priority - prioritize based on whether you auto-ingest untrusted JPEG 2000 content.

Exploit ScenarioDerived

An attacker crafts a malicious JPEG 2000 (HTJ2K) file whose packet headers declare a coding-pass count exceeding 128 for a codeblock. When a victim application built on OpenHTJ2K 0.18.4 or earlier decodes the file, parse_packet_header() writes past the pass_length[128] array, corrupting memory and enabling a crash or potential code execution. No public proof-of-concept is identified at this time, and attack complexity is low (AC:L) - a single malformed file triggers the bug.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 22, 2026

Arbitrary code execution in OpenHTJ2K (an open-source High Throughput JPEG 2000 codec by osamu620) versions 0.18.4 and earlier stems from an unchecked coding-pass counter overflowing the fixed pass_length[128] array while parsing crafted JPEG 2000 packet headers. An attacker who supplies a malicious J2K/HTJ2K image to an application built on the library can corrupt adjacent memory and potentially execute code. No public exploit identified at time of analysis; EPSS is low (0.20%) and CISA SSVC rates current exploitation as none, though technical impact is total and the flaw is automatable.

RemediationAI

Update OpenHTJ2K past the fixed commit 0778b93, which adds a kMaxCodingPasses=128 bound and throws before num_passes can exceed the pass_length[] array; confirm the exact patched release on the project's releases page (https://github.com/osamu620/OpenHTJ2K/releases) and CHANGELOG (https://github.com/osamu620/OpenHTJ2K/blob/main/CHANGELOG), since a released patched version is not independently confirmed from the provided data - the fix is currently traceable to a commit rather than a tagged version. If you cannot rebuild immediately, the practical compensating control is to stop feeding untrusted JPEG 2000/HTJ2K input to the library: gate decoding behind validation or sandbox the decoder process (seccomp/container) so an overflow cannot escalate, and disable or restrict any automated/server-side ingestion of externally supplied .j2k/.jph files. These controls reduce exposure but block or slow legitimate JPEG 2000 processing, so scope them to untrusted sources. Verify your build includes the fix via https://github.com/osamu620/OpenHTJ2K/compare/0778b93...v0.18.4.

Affected VersionsENISA

n/a n/a

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

OpenHTJ2K implements the ISO/IEC 15444-15 High Throughput JPEG 2000 (HTJ2K) codestream format in C++. The defect is in j2k_precinct_subband::parse_packet_header() in source/core/coding/coding_units.cpp, which decodes the per-codeblock packet-header syntax of a JPEG 2000 tile. For each codeblock the parser reads a segment_passes value from the untrusted stream and accumulates it into block->num_passes, which indexes a fixed-size pass_length[128] array. Because the running total was cast straight into a uint8_t with no bounds check, an attacker-controlled pass count could exceed 128 (and wrap the 8-bit counter), driving writes past the end of the array. This is the CWE-121 stack-based buffer overflow class (write beyond a fixed-length buffer using an attacker-influenced length); note the vendor's own fix comment describes it as a heap buffer overflow in pass_length[128], so the exact memory region depends on how the codeblock object is allocated.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (mitre) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.8 HIGH

File-parsing library, so decode of an attacker-supplied image is needed (UI:R); no auth on the code path (PR:N) and a single malformed file triggers it (AC:L), yielding full memory-corruption impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
CVE Published
Jul 14, 2026 - 23:17 cve.org
UNKNOWN (no severity yet)
CVE Published
Jul 14, 2026 - 23:17 cve.org
CRITICAL 9.8

DescriptionCVE.org

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

Executive ViewAI

Why It Matters

Critical arbitrary code execution vulnerability in OpenHTJ2K JPEG 2000 codec (versions 0.18.4 and earlier) enables complete system compromise when processing malicious image files-affecting document imaging, archival, medical imaging, and document processing systems. No vendor-released patch currently exists, forcing organizations to implement workarounds while managing ongoing exploitation risk. The vulnerability's high technical impact and automatable nature create sustained organizational risk until remediation is available.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) restrict JPEG 2000 image sources to explicitly pre-approved internal suppliers, rejecting all untrusted files; (2) implement header validation to reject non-conforming J2K packet structures; (3) sandbox or containerize all image processing workloads to limit code execution blast radius; (4) deploy network segmentation to isolate systems running OpenHTJ2K from critical infrastructure; (5) disable JPEG 2000 support for non-business-critical workflows; (6) implement enhanced monitoring for heap corruption, abnormal process behavior, or unexpected code execution in affected systems.

Threat Intelligence Overview

EPSS Score
0.2%
Top 90% exploitable
Prevalence
Low
niche open-source reference HTJ2K codec, limited production deployment
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy