What’s Vulnerable › Vulnerabilities
CVE-2018-7186
- Severity: critical (CVSS 9.8 v3.0)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 3.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2018-02-16 · updated 2026-06-17
- Weakness: CWE-787
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.
Affected products
- Debian Linux: 7.0
- Leptonica: before 1.75.3 — fixed in 1.75.3
How to fix
Upgrade to a fixed version: Leptonica 1.75.3. Check the vendor advisory for mitigations.
References
- https://bugs.debian.org/890548
- https://github.com/DanBloomberg/leptonica/commit/ee301cb2029db8a6289c5295daa42bba7715e99a
- https://lists.debian.org/debian-lts-announce/2018/03/msg00005.html
- https://lists.debian.org/debian-lts/2018/02/msg00054.html
- https://security.gentoo.org/glsa/202312-01
- https://bugs.debian.org/890548
- https://github.com/DanBloomberg/leptonica/commit/ee301cb2029db8a6289c5295daa42bba7715e99a
- https://lists.debian.org/debian-lts-announce/2018/03/msg00005.html
- https://lists.debian.org/debian-lts/2018/02/msg00054.html
- https://security.gentoo.org/glsa/202312-01
Get alerted when CVE-2018-7186 or the next vulnerability affects your stack