CVE-2021-40985

MEDIUM

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.

Affects 2 products across 2 vendors.

CVSS 3.15.5
EPSS0.9%
Percentile60th
PatchPatched
CVSS Vector — Plain English Requires local access, low complexity, no authentication required, requires user interaction, impact contained to the vulnerable component, no confidentiality impact, no integrity impact, full availability impact.
CWE Weakness Definitions
CWE-125: Out-of-Bounds Read

Software reads data past the boundary of an allocated buffer, leaking sensitive information or causing crashes.

Related Attack Patterns (CAPEC)
CAPEC-540 Overread Buffers
via CWE-125

Mapping is CWE-to-CAPEC per MITRE CAPEC 3.9.

◆ AI Analysis — automated analysis, not human-reviewed

A stack-based buffer under-read vulnerability in htmldoc versions prior to 1.9.12 can be exploited by attackers to cause a denial of service through a specially crafted BMP image.

BSID: BS-2021-GLOBAL-073597-M • Model: /workspace/models/qwen2.5-coder-32b-instruct-bf16 • Confidence: MEDIUM

Is this CVE in your environment?

BreachSpider monitors your ICS/OT environment for vulnerabilities like this one. No agents or network access required. Free to start.

Check My Environment →
Frequently Asked Questions
What is CVE-2021-40985?
A stack-based buffer under-read vulnerability in htmldoc versions prior to 1.9.12 can be exploited by attackers to cause a denial of service through a specially crafted BMP image.
What is the CVSS score for CVE-2021-40985?
CVE-2021-40985 has CVSS 5.5 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H. EPSS: 0.9%.
Is CVE-2021-40985 actively exploited?
No confirmed active exploitation of CVE-2021-40985 as of 2026-05-30.
How do I remediate CVE-2021-40985?
Priority: MEDIUM.
What systems are affected by CVE-2021-40985?
CVE-2021-40985 affects Debian Debian Linux; Htmldoc Project Htmldoc.
Vulnerability Details
CVE IDCVE-2021-40985
BSIDBS-2021-GLOBAL-073597-M BreachSpider Global ID
CVSS VectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Published2021-11-03
Last Modified2024-11-21
ICS Relevance15%
Weakness (CWE)
SourceNVD
Official 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.

Source: NIST NVD / MITRE CVE Database

Attack Vector Analysis — CITED Relevance

The vulnerability exists in the image_load_bmp function of htmldoc, where a crafted BMP image can lead to a stack-based buffer under-read, potentially causing the application to crash or behave unpredictably.

Exploitation Likelihood: MEDIUM

Affected Products
VendorProductAffected Versions
Debian Debian Linux 9.0
Htmldoc Project Htmldoc < 1.9.12
Remediation

No official vendor advisory link on record. See the CVE record →

Threat Intelligence
● Threat Intelligence Validated: October 2026 | Threat Age: 1807 Days
CISA known-exploitedNot in KEV catalog
Public ExploitNot confirmed
PoC CodeNot confirmed
AI Enrichment Record — provenance & audit hash
Model/workspace/models/qwen2.5-coder-32b-instruct-bf16
ConfidenceMEDIUM
Enriched At2026-05-24
SHA-512 Audit Hash023e2f4596c78422da4feb154c0149cf9430a71d6e6555856f279a55c064c6259408346213551eb347e68d17a110a9c47d029c79d6206558499f4a9e091d9ae2
Related CVEs affecting Debian
CVE-2012-0444 10.0 Mozilla Firefox before 3.6.26 and 4.x through 9.0, Thunderbird before 3.1.18 ... CVE-2013-2863 10.0 Google Chrome before 27.0.1453.110 does not properly handle SSL sockets, whic... CVE-2015-2724 10.0 Multiple unspecified vulnerabilities in the browser engine in Mozilla Firefox... CVE-2017-16845 10.0 hw/input/ps2.c in Qemu does not validate 'rptr' and 'count' values during gue... CVE-1999-0698 10.0 Denial of service in IP protocol logger (ippl) on Red Hat and Debian Linux.
View all Debian CVEs →

ICS/OT Vulnerability Intelligence for Your Environment

BreachSpider tracks 384,000+ CVEs and matches them to your ICS/OT assets by exact version, with AI analysis, NERC CIP mapping, and vendor PSIRT contacts.

Create a free account →