{"id":"CVE-2018-7186","aliases":["DEBIAN-CVE-2018-7186","DLA-1302-1","EUVD-2018-18928","GHSA-hx3c-v527-xcjq","MGASA-2018-0175","UBUNTU-CVE-2018-7186","USN-4819-1","openSUSE-SU-2024:10914-1"],"status":"published","title":"Leptonica before 1.75.3 does not limit the number of characters in a %s format argument to fscanf...","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.","severity":{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-07","score":0.03401,"percentile":0.88924,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-787"],"published":"2018-02-16T00:00:00Z","modified":"2026-10-23T18:03:08Z","fixes":[{"ecosystem":"Debian:12","package":"leptonlib","fixed_in":["1.75.3-2"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"leptonlib","fixed_in":["1.75.3-2"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"leptonlib","fixed_in":["1.75.3-2"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:14.04:LTS","package":"leptonlib","fixed_in":["1.70.1-1ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"leptonlib","fixed_in":["1.73-1ubuntu0.1~esm1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"leptonlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.75.3-2"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"leptonlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.75.3-2"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"leptonlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.75.3-2"}]}]},{"source":"osv","ecosystem":"Debian:7","package":"leptonlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.69-3.1+deb7u2"}]}],"versions":["1.69-3.1","1.69-3.1+deb7u1"],"bundled":2},{"source":"osv","ecosystem":"Mageia:6","package":"leptonica","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.75.3-1.mga6"}]}],"bundled":2},{"source":"osv","ecosystem":"Mageia:6","package":"mingw-leptonica","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.75.3-1.mga6"}]}],"bundled":2},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"leptonlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.70.1-1ubuntu0.1~esm1"}]}],"versions":["1.69-4ubuntu1","1.69-4ubuntu2","1.69-4ubuntu3","1.69-4ubuntu4","1.70.1-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"leptonlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.73-1ubuntu0.1~esm1"}]}],"versions":["1.72-3","1.72-3build1","1.73-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"leptonlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.70.1-1ubuntu0.1~esm1"}]}],"versions":["1.69-4ubuntu1","1.69-4ubuntu2","1.69-4ubuntu3","1.69-4ubuntu4","1.70.1-1"],"bundled":3},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"leptonlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.73-1ubuntu0.1~esm1"}]}],"versions":["1.72-3","1.72-3build1","1.73-1"],"bundled":3},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"leptonica","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.80.0-1.9"}]}],"bundled":7}],"products":[{"vendor":"debian","product":"debian_linux"},{"vendor":"leptonica","product":"leptonica"}],"references":[{"url":"https://lists.debian.org/debian-lts-announce/2018/03/msg00005.html","tags":["mailing-list","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://github.com/DanBloomberg/leptonica/commit/ee301cb2029db8a6289c5295daa42bba7715e99a","tags":["x_transferred","Patch","Third Party Advisory","fix","report"]},{"url":"https://bugs.debian.org/890548","tags":["x_transferred","Third Party Advisory","advisory","report"]},{"url":"https://lists.debian.org/debian-lts/2018/02/msg00054.html","tags":["x_transferred","Mailing List","Third Party Advisory","advisory","report"]},{"url":"https://security.gentoo.org/glsa/202312-01","tags":["vendor-advisory","x_transferred","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-7186"},{"url":"https://github.com/advisories/GHSA-hx3c-v527-xcjq"},{"url":"https://security-tracker.debian.org/tracker/CVE-2018-7186","tags":["advisory"]},{"url":"https://advisories.mageia.org/MGASA-2018-0175.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=22742","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2018-7186","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2018-7186","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-4819-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2017-18196","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2018-3836","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2017-18196","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2018-3836","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2018-7186","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2018-7247","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2018-7440","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2018-7441","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2018-7442","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2018-7186","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.","status":"published","published":"2018-02-16T00:00:00Z","modified":"2024-08-05T06:24:11.501Z","updated_at":"2026-11-02T14:35:10.313768Z"}],"euvd":[{"id":"EUVD-2018-18928","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.","status":"published","published":"2018-02-16T00:00:00Z","modified":"2024-08-05T06:24:11Z","updated_at":"2026-11-03T02:40:06.682302Z"}],"ghsa":[{"id":"GHSA-hx3c-v527-xcjq","title":"Leptonica before 1.75.3 does not limit the number of characters in a %s format argument to fscanf...","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.","status":"published","published":"2022-05-13T01:20:33Z","modified":"2023-02-01T05:05:59Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-787"],"updated_at":"2026-11-02T14:50:18.532439Z"}],"nvd":[{"id":"CVE-2018-7186","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.","status":"published","published":"2018-02-16T16:29:00.16Z","modified":"2026-06-17T02:02:45.863Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-787"],"updated_at":"2026-11-02T14:04:23.783914Z"}],"osv":[{"id":"CVE-2018-7186","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.","status":"published","published":"2018-02-16T16:29:00.16Z","modified":"2026-10-20T13:35:01.089672262Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:09.74357Z"},{"id":"DEBIAN-CVE-2018-7186","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.","status":"published","published":"2018-02-16T16:29:00.16Z","modified":"2026-10-23T18:03:08.087429371Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:30.867575Z"},{"id":"UBUNTU-CVE-2018-7186","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.","status":"published","published":"2018-02-16T16:29:00Z","modified":"2026-04-22T12:03:04.854375Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:18.772093Z"},{"id":"DLA-1302-1","title":"leptonlib - security update","status":"published","published":"2018-03-07T00:00:00Z","modified":"2026-03-09T01:02:05.180758Z","updated_at":"2026-11-02T15:46:09.336894Z"},{"id":"MGASA-2018-0175","title":"Updated leptonica packages fix security vulnerabilities","description":"Package leptonica has been updated to the current stable version 1.75.3\nwhich fixes:\n\nCVE-2018-7186 - multiple stack-based buffer overflows in gplotRead()\nand ptaReadStream()\n\nCVE-2018-7247 - a buffer overflow in src/viewfiles.c with unsanitized\ninput (rootname)\n","status":"published","published":"2018-03-19T12:13:14Z","modified":"2026-04-16T06:24:09.119611457Z","updated_at":"2026-11-02T15:49:40.442238Z"},{"id":"openSUSE-SU-2024:10914-1","title":"leptonica-devel-1.80.0-1.9 on GA media","description":"These are all security issues fixed in the leptonica-devel-1.80.0-1.9 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2025-05-07T18:09:40.124008Z","updated_at":"2026-11-02T16:58:34.894275Z"},{"id":"USN-4819-1","title":"leptonlib vulnerabilities","description":"It was discovered that Leptonica incorrectly handled path names. An\nattacker could possibly use this issue to obtain sensitive information.\nThis issue only affected Ubuntu 16.04 ESM. (CVE-2017-18196)\n\nIt was discovered that Leptonica incorrectly handled certain input\narguments. An attacker could possibly use this issue to execute arbitrary\ncommands. (CVE-2018-3836)\n\nIt was discovered that Leptonica incorrectly handled input arguments. An\nattacker could possibly use this issue to cause a denial of service or\nother unspecified impact. (CVE-2018-7186)\n","status":"published","published":"2021-03-15T21:56:16Z","modified":"2026-06-29T13:48:30.87407995Z","updated_at":"2026-11-02T16:58:15.159055Z"}]}}
