# CVE-2021-40985: 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 imageloa…

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.94%, higher than 61% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-11-03T16:08:46.000Z
- Modified: 2026-06-17T04:07:42.263Z
- Weaknesses: CWE-125
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- htmldoc_project htmldoc: before 1.9.12
- debian debian_linux: 9.0

## Every score

- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:N/A:P`

## References

- <https://github.com/michaelrsweet/htmldoc/issues/444> (exploit, issue-tracking, patch, third-party-advisory)
- <https://github.com/michaelrsweet/htmldoc/commit/f12b9666e582a8e7b70f11b28e5ffc49ad625d43> (patch, third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2022/02/msg00022.html> (mailing-list, third-party-advisory)

## Sources

- CVE List: [CVE-2021-40985](https://www.cve.org/CVERecord?id=CVE-2021-40985), CVE Terms of Use, modified 2024-08-04
- NVD: [CVE-2021-40985](https://nvd.nist.gov/vuln/detail/CVE-2021-40985), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-40985 · Whole record: https://cve.day/CVE-2021-40985.json · Rebuilt by cve.day 2026-11-25T22:58:05.332Z
