Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessLocal access to file-processing app
-
DeliverySupply >1GB crafted file
-
ExploitTrigger undersized alloc in l_byteaCreate
-
Executionmemcpy overruns heap buffer
-
ImpactApplication crash (denial of service)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
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 application to process an attacker-supplied input stream/file larger than 1,000,000,000 bytes through Leptonica's l_byteaInitFromStream()/l_byteaCreate() code path (src/bytearray.c). Per the CVSS vector this is a local vector (AV:L) requiring passive user interaction (UI:P) - i.e., a user or application must open/process the oversized file - and no authentication (PR:N). Limiting factors that reduce realistic risk: the attacker must be able to deliver and have processed a file exceeding ~1 GB (which may be blocked by upstream size limits or impractical in many pipelines), the vector is local rather than remote, and the outcome observed in the evidence is a crash (availability only) rather than code execution or data disclosure. |
| Impact | This is a moderate-severity, availability-only issue, not a top-tier priority. The input CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H) scores it 6.8 and models the realistic case: local attack vector, passive user interaction required, and impact limited to the vulnerable system's availability (VA:H) with no confidentiality or integrity loss. The description and the source-code evidence confirm the mechanism is a crash - l_byteaCreate() allocates a 201-byte buffer while memcpy copies the full (>1,000,000,000-byte) stream size, overrunning the heap. Although CWE-122 heap overflows can sometimes be leveraged beyond a crash, the available evidence only establishes a denial-of-service, and the CVSS scoring reflects that (VC/VI = N). The vuln.today decision label is 'this_month', not act_now or emergency. No KEV listing, no EPSS score, and no verified exploit code were provided, consistent with a non-urgent, non-actively-exploited flaw. The main caveat: the AV:L/UI:P combination means real-world risk depends heavily on whether an application built on Leptonica feeds untrusted, attacker-controlled large files into the l_byteaInitFromStream path - verify exposure against your actual data flow. |
| Exploit ScenarioDerived | An attacker supplies a crafted or padded file exceeding 1,000,000,000 bytes to an application that uses Leptonica to read it via l_byteaInitFromStream()/l_byteaCreate(). When the stream is processed, a 201-byte heap buffer is allocated but the full billion-plus-byte stream is copied into it, overrunning the heap and crashing the application (denial of service). No public, verified exploit code was identified; exploitation requires local delivery and passive processing of the oversized file (UI:P). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 25, 2026
Heap buffer overflow in Leptonica 1.79.0 through 1.87.0 lets an attacker who can get an oversized stream processed by l_byteaInitFromStream() write past a heap allocation and crash the application. The size accounting in l_byteaCreate() under-allocates (observed as a 201-byte buffer) when the incoming stream exceeds roughly 1,000,000,000 bytes, and the subsequent memcpy copies the full stream length, so the demonstrated outcome is an availability impact (crash) rather than code execution or data exposure. Per the assessed vector the attack is local (AV:L) with passive user interaction (UI:P) and no privileges required (PR:N); no public exploit code has been identified at time of analysis, and the issue has not been added to CISA KEV.
RemediationAI
Vendor patch is available: the fix commit c493a776e6bc6cfb1d8d15152a0b74f3d15b33fd (https://github.com/DanBloomberg/leptonica/commit/c493a776e6bc6cfb1d8d15152a0b74f3d15b33fd) adds an nbytes > MaxArraySize check in src/bytearray.c that frees the buffer and returns an error rather than copying; upstream fix available (commit-level), and a released patched version number is not independently confirmed in the supplied data, so consumers should rebuild Leptonica from a revision containing that commit or obtain a vendor build that includes it. Where rebuilding is not immediately possible, enforce a hard input-size cap below the ~1,000,000,000-byte threshold in the layer that hands streams to Leptonica's l_byteaInitFromStream()/l_byteaCreate() path, rejecting oversized files before parsing; the trade-off is that legitimately large images or streams above the cap will be refused, so the limit must be set against actual business input sizes. Priorities follow the this_month decision label: this is a moderate-severity, availability-only issue rather than an emergency, so schedule the rebuild or the input-size guard in the current monthly cycle. Details are also documented at https://www.vulncheck.com/advisories/leptonica-1.79.0-through-1.87.0-heap-buffer-overflow-via-l-byteainitfromstream.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Leptonica's src/bytearray.c implements L_BYTEA, a growable byte buffer abstraction used by higher-level image and stream parsing routines. CWE-122 (heap-based buffer overflow) arises here because l_byteaInitFromStream() delegates buffer allocation to l_byteaCreate() based on a size value that does not correctly account for very large stream lengths; the allocation observed in the report is 201 bytes while the following memcpy writes the full stream size. The upstream fix commit c493a776e6bc6cfb1d8d15152a0b74f3d15b33fd adds an explicit guard before the copy that rejects any nbytes value greater than MaxArraySize, frees the intermediate data buffer, and returns an ERROR_PTR("stream too large") instead of proceeding. The affected code path is reached only when an application routes an attacker-supplied stream or file through this API, and the trigger requires the input size to exceed approximately 1 GB; the sources do not describe any way to reach the overflow with a smaller payload or via a remote, unauthenticated service interface.
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
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Local processing of an attacker-supplied oversized file (AV:L, UI:R) with no auth (PR:N); evidence shows only a crash, so C:N/I:N and A:H.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Leptonica 1.79.0 through 1.87.0 contains a heap-based buffer overflow vulnerability in l_byteaInitFromStream() that allows attackers to write past a heap buffer by supplying oversized input. Attackers can provide a file larger than 1,000,000,000 bytes, causing l_byteaCreate() to allocate a 201-byte buffer before memcpy copies the full stream size, crashing the application.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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 heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.
An exploitable command injection vulnerability exists in the gplotMakeOutput function of Leptonica 1.74.4. Rated high se
An issue in the Leptonica linked library (v1.79.0) allows attackers to cause an arithmetic exception leading to a Denial
An issue was discovered in Leptonica through 1.75.3. Rated critical severity (CVSS 9.8), this vulnerability is remotely
An issue was discovered in pixHtmlViewer in prog/htmlviewer.c in Leptonica before 1.75.3. Rated critical severity (CVSS
Leptonica before 1.75.3 does not limit the number of characters in a %s format argument to fscanf or sscanf, which allow
An issue was discovered in Leptonica through 1.75.3. Rated critical severity (CVSS 9.1), this vulnerability is remotely
Leptonica through 1.75.3 uses hardcoded /tmp pathnames, which might allow local users to overwrite arbitrary files or ha
Out-of-bounds read in Leptonica's pixReadMemJp2kCore() JPEG 2000 decoding path can leak adjacent heap memory into decode
EUVD-2026-135705
GHSA-4g5v-hgh8-49r5
NVD
CVE.org
EPSS
Exploit-DB