Leptonica 1.79.0 through 1.87.0 Heap Buffer Overflow via l_byteaInitFromStream()
- State
- Published
- Severity
- 6.8 Medium
- Published
- Nov 25, 2026
- Updated
- Nov 30, 2026
- Reserved
- Nov 25, 2026
Description
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.
| Product | Versions |
|---|---|
| Leptonica Leptonica | 1.79.0 through 1.87.0 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 6.8 Medium | VulnCheck | |
| 3.1 | 5.5 Medium | VulnCheck |
Weaknesses
- CWE-122 Heap-based Buffer Overflow
References
- https://github.com/DanBloomberg/leptonica/commit/c493a776e6bc6cfb1d8d15152a0b74f3d15b33fdPatch
- https://github.com/DanBloomberg/leptonica/blob/1.87.0/src/bytearray.c#L177-L197Technical Details
- VulnCheck Advisory: Leptonica 1.79.0 through 1.87.0 Heap Buffer Overflow via l_byteaInitFromStream()Third-Party Advisory
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.