Skip to main content

Leptonica EUVDEUVD-2026-128520

| CVE-2026-112213 MEDIUM
Out-of-bounds Read (CWE-125)
2026-11-18 INCIBE GHSA-224h-2p3g-wjxj
6.9
CVSS 4.0 · Vendor: INCIBE
View

Attack ChainAIDerived

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

  1. Access
    Submit crafted JP2K image to decoder
  2. Delivery
    Component 0 dimensions applied to all components
  3. Exploit
    Index exceeds smaller component buffers
  4. Execution
    Adjacent heap memory read into pixels
  5. Impact
    Retrieve decoded output to disclose leaked memory

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

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 application to decode an attacker-supplied JPEG 2000 image through Leptonica's pixReadMemJp2kCore() path (jp2kio.c), which depends on OpenJPEG. The crafted image must contain multiple components where components other than component 0 have smaller dimensions (e.g. chroma-subsampled components), since the flaw stems from reusing component 0's output dimensions as a common index across all component sample buffers. To actually realize information disclosure, the decoded output image must be reachable by the attacker (returned, stored, or displayed); where the output is not attacker-accessible the leak is not observable. Per the CVSS 4.0 vector, no authentication (PR:N) and no user interaction (UI:N) are required, and confidentiality impact is low (VC:L) with no integrity or availability impact.

Impact

This is a medium-severity information-disclosure flaw (input CVSS 4.0 base 6.9) whose real-world priority is moderate, not urgent. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) describes network reach with low complexity, no attack requirements, and no privileges, but impact is limited to low confidentiality (VC:L) with no integrity or availability effect - consistent with an out-of-bounds read (CWE-125) that leaks adjacent heap bytes into decoded pixels rather than enabling code execution. The vuln.today decision label is 'this_month' (not act_now/emergency), aligning with that bounded impact. No EPSS score, no CISA KEV listing, and no PoC or exploit reference were supplied, so there is no evidence of active or probable near-term exploitation. The signals are therefore consistent rather than conflicting: a genuinely reachable but low-impact leak. One caveat to verify: the 'network' vector assumes the vulnerable application exposes Leptonica's JP2K decoding to attacker-supplied images AND returns the decoded output to the attacker - only then is the leaked memory actually disclosed; where decoded output is not attacker-visible, practical confidentiality impact is lower than the vector implies.

Exploit ScenarioDerived

An attacker submits a specially crafted JPEG 2000 image to a service that decodes images with Leptonica (for example an OCR, thumbnailing, or document-processing pipeline). Because the code uses component 0's dimensions to index the smaller sample buffers of other components, the decoder reads past those buffers and incorporates adjacent heap memory into the output pixels; if the attacker can retrieve the decoded image, leaked process memory is disclosed. No public exploit identified at time of analysis, and the vector requires no authentication (PR:N) or user interaction (UI:N).

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Nov 18, 2026

Out-of-bounds read in Leptonica's pixReadMemJp2kCore() JPEG 2000 decoding path can leak adjacent heap memory into decoded image pixels when a crafted JP2 image contains multiple components with differing dimensions. Applications that use Leptonica with OpenJPEG to decode untrusted JPEG 2000 content are exposed; remote attackers need no authentication or user interaction per the CVSS vector, but disclosure is only observable if the attacker can access the decoded output. No public exploit was identified at time of analysis, and the issue is assessed as medium severity with low confidentiality impact and a vuln.today priority of this_month rather than an emergency.

RemediationAI

No vendor-released patch was identified at time of analysis; track the INCIBE advisory at https://www.incibe.es/en/incibe-cert/notices/aviso/reading-limits-dan-bloomberg-leptonica for the fixed Leptonica release and upgrade as soon as it is published. Until then, the most direct mitigation is to stop passing untrusted JPEG 2000 data to Leptonica's pixReadMemJp2kCore() path: if JP2K support is not required, rebuild Leptonica without OpenJPEG/JPEG 2000 decoding or disable JP2K handlers in the consuming application, accepting the loss of JP2K functionality. If JPEG 2000 must remain enabled, decode untrusted images in a sandboxed, low-privilege worker with a separate heap and strict resource limits, or transcode and validate JP2 files with an independent decoder before Leptonica processes them; these controls reduce exposure of adjacent heap contents but do not remove the underlying out-of-bounds read. Also ensure that decoded output from untrusted JP2 inputs is not returned to the submitter or exposed through a public endpoint, since the leak is only observable when the attacker can access the decoded image.

Affected VersionsENISA

Leptonica Leptonica 1.87.0 (commit 13275a2), in builds with JPEG 2000 support enabled via HAVE_LIBJP2K / OpenJPEG.

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

Leptonica is an open-source image-processing library used by OCR, document, and imaging pipelines; jp2kio.c implements JPEG 2000 support through OpenJPEG. In pixReadMemJp2kCore(), the code obtains decoded output dimensions for component 0 and then reuses that common index when iterating sample buffers for every component. When a crafted JPEG 2000 image defines additional components with smaller dimensions, such as chroma-subsampled planes, the loop reads past the end of those OpenJPEG-allocated sample buffers, an out-of-bounds read classed as CWE-125. The over-read data can be blended into the decoded pixel output, turning a memory-safety bug into an information-disclosure primitive against the process heap; the CPE identifies dan_bloomberg:leptonica as the affected product, and exploitation requires the application to decode an attacker-supplied JP2 image and expose the resulting decoded image back to the attacker.

Know when Leptonica gets its next vulnerability

  • 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 (INCIBE) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

Network-reachable decoding of an attacker-supplied image with no auth (PR:N) or interaction; impact limited to a bounded heap over-read, so C:L and I:N/A:N.

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

Primary rating from Vendor (INCIBE).

CVSS VectorVendor: INCIBE

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Out-of-bounds read vulnerability in the pixReadMemJp2kCore() function in Leptonica, located in jp2kio.c. The function retrieves the output dimensions only for component 0 and uses a common index to iterate through the buffers of all components. If the remaining components have smaller dimensions, the traversal exceeds the bounds of their sample buffers, which are allocated by OpenJPEG. When processing a specially crafted JPEG 2000 image, data read from adjacent dynamic memory may be incorporated into the pixels of the decoded image and result in information disclosure to anyone who can access the output.

Threat Intelligence Overview

EPSS Score
0.3%
Top 73% exploitable
Prevalence
High
widely embedded image library underpinning Tesseract OCR and many pipelines
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
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· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
High
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
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.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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