{"id":"CVE-2021-40985","aliases":["DEBIAN-CVE-2021-40985","DLA-2928-1","EUVD-2021-28138","GHSA-vfx2-gpvv-rwcm","MGASA-2022-0014","SUSE-SU-2021:14869-1","UBUNTU-CVE-2021-40985","USN-7189-1","openSUSE-SU-2024:11611-1"],"status":"published","title":"Buffer overflow vulnerability in htmldoc before 1.9.12, allows attackers to cause a denial of...","description":"A stack-based buffer under-read in htmldoc before 1.9.12, allows attackers to cause a denial of service via a crafted BMP image to image_load_bmp.","severity":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.00937,"percentile":0.61089,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-120","CWE-125","CWE-787"],"published":"2021-11-03T16:08:46Z","modified":"2026-10-23T18:00:20Z","fixes":[{"ecosystem":"Debian:12","package":"htmldoc","fixed_in":["1.9.13-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"htmldoc","fixed_in":["1.9.13-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"htmldoc","fixed_in":["1.9.13-1"],"sources":["osv"]},{"ecosystem":"Mageia:8","package":"htmldoc","fixed_in":["1.9.8-1.3.mga8"],"sources":["osv"]},{"ecosystem":"SUSE:Subscription Management Tool 11 SP3","package":"htmldoc","fixed_in":["1.8.27-170.4.3.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:14.04:LTS","package":"htmldoc","fixed_in":["1.8.27-8ubuntu1+esm3"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"htmldoc","fixed_in":["1.8.27-8ubuntu1.1+esm2"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:18.04:LTS","package":"htmldoc","fixed_in":["1.9.2-1ubuntu0.2+esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:20.04:LTS","package":"htmldoc","fixed_in":["1.9.7-1ubuntu0.3+esm1"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"htmldoc","fixed_in":["1.9.12-2.1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.13-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.13-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.13-1"}]}]},{"source":"osv","ecosystem":"Debian:9","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.27-8+deb9u2"}]}],"versions":["1.8.27-8","1.8.27-8+deb9u1"],"bundled":3},{"source":"osv","ecosystem":"Mageia:8","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.8-1.3.mga8"}]}]},{"source":"osv","ecosystem":"SUSE:Subscription Management Tool 11 SP3","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.27-170.4.3.1"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.27-8ubuntu1+esm3"}]}],"versions":["1.8.27-8ubuntu1","1.8.27-8ubuntu1+esm1","1.8.27-8ubuntu1+esm2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.27-8ubuntu1.1+esm2"}]}],"versions":["1.8.27-8ubuntu1","1.8.27-8ubuntu1.1","1.8.27-8ubuntu1.1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.2-1ubuntu0.2+esm1"}]}],"versions":["1.8.27-8ubuntu2","1.8.27-8ubuntu3","1.9.2-1","1.9.2-1ubuntu0.1","1.9.2-1ubuntu0.2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.7-1ubuntu0.3+esm1"}]}],"versions":["1.9.3-1","1.9.7-1","1.9.7-1build1","1.9.7-1ubuntu0.2","1.9.7-1ubuntu0.3"]},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.27-8ubuntu1+esm3"}]}],"versions":["1.8.27-8ubuntu1","1.8.27-8ubuntu1+esm1","1.8.27-8ubuntu1+esm2"],"bundled":11},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.27-8ubuntu1.1+esm2"}]}],"versions":["1.8.27-8ubuntu1","1.8.27-8ubuntu1.1","1.8.27-8ubuntu1.1+esm1"],"bundled":11},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.2-1ubuntu0.2+esm1"}]}],"versions":["1.8.27-8ubuntu2","1.8.27-8ubuntu3","1.9.2-1","1.9.2-1ubuntu0.1","1.9.2-1ubuntu0.2"],"bundled":11},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.7-1ubuntu0.3+esm1"}]}],"versions":["1.9.3-1","1.9.7-1","1.9.7-1build1","1.9.7-1ubuntu0.2","1.9.7-1ubuntu0.3"],"bundled":11},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"htmldoc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.12-2.1"}]}]}],"products":[{"vendor":"debian","product":"debian_linux"},{"vendor":"htmldoc_project","product":"htmldoc"}],"references":[{"url":"https://github.com/michaelrsweet/htmldoc/commit/f12b9666e582a8e7b70f11b28e5ffc49ad625d43","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","report"]},{"url":"https://github.com/michaelrsweet/htmldoc/issues/444","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Patch","Third Party Advisory","fix","report"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/02/msg00022.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-40985"},{"url":"https://github.com/advisories/GHSA-vfx2-gpvv-rwcm"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-40985","tags":["advisory"]},{"url":"https://advisories.mageia.org/MGASA-2022-0014.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=29806","tags":["report"]},{"url":"https://lists.suse.com/pipermail/sle-security-updates/2021-December/009935.html","tags":["web"]},{"url":"https://www.suse.com/support/update/announcement/2021/suse-su-202114869-1/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1192357","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2021-40985","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2021-40985","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-40985","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-7189-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-20308","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-23158","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-23191","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-23206","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-26252","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-26259","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-26948","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-34119","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-34121","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-43579","tags":["report"]},{"url":"","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2021-40985","description":"A stack-based buffer under-read in htmldoc before 1.9.12, allows attackers to cause a denial of service via a crafted BMP image to image_load_bmp.","status":"published","published":"2021-11-03T16:08:46Z","modified":"2024-08-04T02:59:31.003Z","updated_at":"2026-11-02T14:33:01.495293Z"}],"euvd":[{"id":"EUVD-2021-28138","description":"A stack-based buffer under-read in htmldoc before 1.9.12, allows attackers to cause a denial of service via a crafted BMP image to image_load_bmp.","status":"published","published":"2021-11-03T16:08:46Z","modified":"2024-08-04T02:59:31Z","updated_at":"2026-11-03T03:24:19.242491Z"}],"ghsa":[{"id":"GHSA-vfx2-gpvv-rwcm","title":"Buffer overflow vulnerability in htmldoc before 1.9.12, allows attackers to cause a denial of...","description":"Buffer overflow vulnerability in htmldoc before 1.9.12, allows attackers to cause a denial of service via a crafted BMP image to image_load_bmp.","status":"published","published":"2022-05-24T19:19:33Z","modified":"2023-01-30T05:03:34Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-120","CWE-787"],"updated_at":"2026-11-02T14:46:51.868413Z"}],"nvd":[{"id":"CVE-2021-40985","description":"A stack-based buffer under-read in htmldoc before 1.9.12, allows attackers to cause a denial of service via a crafted BMP image to image_load_bmp.","status":"published","published":"2021-11-03T17:15:08.387Z","modified":"2026-06-17T04:07:42.263Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-125"],"updated_at":"2026-11-02T14:07:00.549994Z"}],"osv":[{"id":"CVE-2021-40985","description":"A stack-based buffer under-read in htmldoc before 1.9.12, allows attackers to cause a denial of service via a crafted BMP image to image_load_bmp.","status":"published","published":"2021-11-03T17:15:08.387Z","modified":"2026-10-20T14:08:52.430531219Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:44:21.249056Z"},{"id":"DEBIAN-CVE-2021-40985","description":"A stack-based buffer under-read in htmldoc before 1.9.12, allows attackers to cause a denial of service via a crafted BMP image to image_load_bmp.","status":"published","published":"2021-11-03T17:15:08.387Z","modified":"2026-10-23T18:00:20.95102205Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:45:35.521549Z"},{"id":"UBUNTU-CVE-2021-40985","description":"A stack-based buffer under-read in htmldoc before 1.9.12, allows attackers to cause a denial of service via a crafted BMP image to image_load_bmp.","status":"published","published":"2021-11-03T17:15:00Z","modified":"2026-02-04T03:09:20.777366Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:54:29.220315Z"},{"id":"DLA-2928-1","title":"htmldoc - security update","status":"published","published":"2022-02-26T00:00:00Z","modified":"2026-03-09T01:23:38.786801Z","updated_at":"2026-11-02T15:46:11.189256Z"},{"id":"MGASA-2022-0014","title":"Updated htmldoc packages fix security vulnerability","description":"Buffer overflow vulnerability in htmldoc before 1.9.12, allows attackers\nto cause a denial of service via a crafted BMP image to image_load_bmp.\n(CVE-2021-40985)\n","status":"published","published":"2022-01-15T08:09:56Z","modified":"2026-04-16T04:40:47.531003043Z","updated_at":"2026-11-02T15:49:41.849028Z"},{"id":"openSUSE-SU-2024:11611-1","title":"htmldoc-1.9.12-2.1 on GA media","description":"These are all security issues fixed in the htmldoc-1.9.12-2.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2025-05-07T18:13:13.426292Z","updated_at":"2026-11-02T16:58:35.195147Z"},{"id":"SUSE-SU-2021:14869-1","title":"Security update for htmldoc","description":"This update for htmldoc fixes the following issues:\n\n- CVE-2021-40985: Fixed a buffer overflow that may have let to a DoS via a crafted BMP image (bsc#1192357).\n","status":"published","published":"2021-12-23T08:55:53Z","modified":"2026-02-04T03:26:56.777001Z","updated_at":"2026-11-02T15:53:49.138643Z"},{"id":"USN-7189-1","title":"HTMLDOC vulnerabilities","description":"It was discovered that HTMLDOC incorrectly handled certain inputs, which\ncould lead to an integer overflow. An attacker could potentially use this\nissue to cause a denial of service or execute arbitrary code.\n(CVE-2021-20308)\n\nIt was discovered that HTMLDOC incorrectly handled memory in pspdf_export,\nwhich could lead to a double-free. An attacker could potentially use this\nissue to cause a denial of service or execute arbitrary code.\n(CVE-2021-23158)\n\nIt was discovered that HTMLDOC incorrectly handled memory when loading a\nJPEG image, which could lead to a NULL pointer dereference. An attacker\ncould potentially use this issue to cause a denial of service.\n(CVE-2021-23191, CVE-2021-26948)\n\nIt was discovered that HTMLDOC incorrectly handled certain inputs, which\ncould lead to a stack buffer overflow. An attacker could potentially use\nthis issue to cause a denial of service or execute arbitrary code.\n(CVE-2021-23206, CVE-2021-40985, CVE-2021-43579)\n\nIt was discovered that HTMLDOC incorrectly handled memory in\npdpdf_prepare_page and render_table_row, which could lead to a heap buffer\noverflow. An attacker could potentially use this issue to cause a denial\nof service or execute arbitrary code. (CVE-2021-26252, CVE-2021-26259)\n\nIt was discovered that HTMLDOC incorrectly handled memory in\nparse_paragraph, which could lead to a heap buffer overflow. An attacker\ncould potentially use this issue to cause a denial of service or execute\narbitrary code. This issue only affected Ubuntu 20.04 LTS. (CVE-2021-34119)\n\nIt was discovered that HTMLDOC incorrectly handled memory in parse_tree.\nAn attacker could potentially use this issue to leak sensitive\ninformation. (CVE-2021-34121)\n","status":"published","published":"2025-01-08T01:23:50Z","modified":"2026-06-25T13:32:29.997721461Z","updated_at":"2026-11-02T16:58:18.876384Z"}]}}
