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 imageloadbmp.
{
"unresolved_ranges": [
{
"extracted_events": [
{
"introduced": "9.0"
},
{
"last_affected": "9.0"
}
],
"vendor_product": "debian:debian_linux",
"source": "CPE_STRING",
"cpes": [
"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
]
}
]
}{
"extracted_events": [
{
"introduced": "0"
},
{
"fixed": "1.9.12"
}
],
"cpe": "cpe:2.3:a:htmldoc_project:htmldoc:*:*:*:*:*:*:*:*",
"source": [
"CPE_RANGE",
"REFERENCES"
]
}"2026-07-09T08:10:24Z"
[
{
"signature_type": "Function",
"target": {
"file": "htmldoc/image.cxx",
"function": "image_load_bmp"
},
"digest": {
"function_hash": "235288188373485764838552579787458681969",
"length": 4196.0
},
"signature_version": "v1",
"id": "CVE-2021-40985-5711492f",
"source": "https://github.com/michaelrsweet/htmldoc/commit/f12b9666e582a8e7b70f11b28e5ffc49ad625d43",
"deprecated": false
},
{
"signature_type": "Line",
"target": {
"file": "htmldoc/image.cxx"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"257141514835789531580371397587660108400",
"283175293527098262048020954610039308665",
"183847361107666746679610264155092227619",
"70669642789662802104105858184899219014",
"168806463103019594349885454995563723793",
"78063532877380292851353647147807482642",
"23937941108991224855156320071632840118",
"79038696367307572280894279184605094182",
"252027508351634483800230415675881158328",
"111665357732966115136306573663186122285",
"269559370259603800226433636181528946091"
]
},
"signature_version": "v1",
"id": "CVE-2021-40985-cf967adb",
"source": "https://github.com/michaelrsweet/htmldoc/commit/f12b9666e582a8e7b70f11b28e5ffc49ad625d43",
"deprecated": false
}
]
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-40985.json"