Description
Leptonica before 1.75.3 does not limit the number of characters in a %s format argument to fscanf or sscanf, which allows remote attackers to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a long string, as demonstrated by the gplotRead and ptaReadStream functions.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | leptonlib | 1.75.3-2 | — |
| Debian 13 | leptonlib | 1.75.3-2 | — |
| Debian 12 | leptonlib | 1.75.3-2 | — |
| Debian 7 | leptonlib | 1.69-3.1+deb7u2 | DLA-1302-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | leptonlib | 1.73-1ubuntu0.1~esm1 | USN-4819-1 |
| Ubuntu Pro 14.04 LTS | leptonlib | 1.70.1-1ubuntu0.1~esm1 | USN-4819-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | leptonica | 1.80.0-1.9 | openSUSE-SU-2024:10914-1 |
Advisories 3
- USN-4819-1 leptonlib vulnerabilities Ubuntu Security Notices (USN) · Jun 29, 2026
- DLA-1302-1 leptonlib - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:10914-1 leptonica-devel-1.80.0-1.9 on GA media SUSE / openSUSE Security Updates · May 7, 2025
References
- [debian-lts-announce] 20180307 [SECURITY] [DLA 1302-1] leptonlib security update mailing-list
- https://github.com/DanBloomberg/leptonica/commit/ee301cb2029db8a6289c5295daa42bba7715e99a
- https://bugs.debian.org/890548
- https://lists.debian.org/debian-lts/2018/02/msg00054.html
- GLSA-202312-01 vendor-advisory