Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft BMP with overflowing header width
-
DeliveryDeliver file to a CImg-based application
-
ExploitTrigger integer overflow in _load_bmp() row byte count
-
ExecutionHeap out-of-bounds read during pixel decode
-
ImpactCrash process or leak heap memory into decoded image
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an application that uses CImg 4.0.6 or earlier and invokes its BMP loader (_load_bmp / load_bmp) on an attacker-controlled file; the specific trigger is a BMP whose header width field is large enough to overflow the dx_bytes row byte-count computation. Limiting factors: this is a local/file-processing vector (AV:L) requiring the victim or victim application to load the crafted BMP (UI:P) - there is no direct remote network trigger unless a higher-level product exposes BMP decoding to untrusted input; no authentication is involved (PR:N); and impact is confined to a crash or heap-memory disclosure into the decoded image (no integrity change or code execution is indicated). Products that never pass untrusted BMP data to CImg are not realistically exposed. |
| Impact | This is a genuine but moderate-priority issue rather than a top-tier emergency. The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P, score 6.9 Medium) is consistent with the description: this is a file-parsing flaw in a library, so the 'local' attack vector reflects that a victim application must process an attacker-supplied BMP rather than the attacker reaching a network service directly, and UI:P reflects that passive user/application action (loading the file) is required. Impact is weighted toward availability (VA:H, process crash from the heap out-of-bounds read) with limited confidentiality (VC:L, adjacent heap bytes disclosed into the decoded image); there is no integrity or code-execution claim. No EPSS score was provided and the CVE is not listed in CISA KEV, so there is no quantitative or confirmed signal of in-the-wild exploitation; the vendor-ecosystem decision label is 'this_month' (notably not 'act_now' or 'emergency'), which aligns with a patch-in-routine-cycle urgency. The main caveat: EPSS is missing and PoC status is not explicitly confirmed, so exploitation likelihood is inferred from the mechanism and the public VulnCheck advisory rather than measured - treat the risk as real-but-bounded and prioritize patching for any product that ingests untrusted BMP files through CImg. |
| Exploit ScenarioDerived | An attacker crafts a BMP file whose header width is large enough that the row byte-count calculation (dx_bytes) integer-overflows and wraps, undersizing the pixel buffer. When a victim application built on CImg 4.0.6 or earlier decodes that file via _load_bmp(), the decoder reads past the allocated heap buffer, crashing the process or copying adjacent heap memory into the decoded image and disclosing it. No confirmed working exploit is published, though the flaw is documented in the vendor issue tracker and a VulnCheck advisory, and the local/UI-required vector means the victim must be induced to load the malicious image. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 28, 2026
Loading a crafted BMP with CImg 4.0.6 or earlier can crash the host application and copy heap memory into the decoded image, because the BMP loader's row byte-count computation in _load_bmp() overflows on an oversized header width. The flaw is a local, file-processing vector: an application must invoke CImg's BMP decoder on attacker-supplied data (CVSS 4.0 AV:L/UI:P, PR:N), and impact is limited to availability loss plus low-confidentiality heap disclosure, with no integrity or code-execution path indicated. No public exploit or CISA KEV entry is associated with this CVE at time of analysis, an upstream fix commit is available, and the issue is assessed as moderate priority ('this_month') rather than an emergency. CImg is a header-only C++ library, so every project that vendors a copy of CImg.h inherits the exposure until it recompiles against the patched header.
RemediationAI
Patch status: upstream fix available (PR/commit); a released, tagged CImg version containing the fix is not named in the available data, so confirm the tag before relying on a version number. Apply upstream commit b9ed613d9984f9caa1617b97e1db7e429cf14fd5 (https://github.com/GreycLab/CImg/commit/b9ed613d9984f9caa1617b97e1db7e429cf14fd5) and rebuild - because CImg is header-only, every vendored copy of CImg.h in your tree, including submodules and third-party bundles, must be updated and each dependent binary recompiled; updating a package manifest alone does not change already-shipped binaries. Until then, the practical compensating controls are architectural: do not pass untrusted BMP files to CImg's load_bmp() (convert or pre-validate BMPs with an independent, hardened decoder before handing them to CImg, trading off format coverage), and reject BMP inputs at the ingest boundary whose declared header width/bpp would produce an implausibly large row size, or that use RLE compression (BI_RLE8/BI_RLE4), which this parser does not safely handle from FILE* streams - with the caveat that this duplicates the vendor's validation logic and is only as reliable as the check itself. Because impact is confined to a crash and heap disclosure in the decoding process, run image decoding in a sandboxed, memory-limited child process or worker with minimal privileges so an out-of-bounds read cannot reach sensitive heap data and a crash does not take down the parent service. Track the vendor issue (https://github.com/GreycLab/CImg/issues/495) and the VulnCheck advisory for the fix release. No vendor workaround short of the code fix is documented in the available sources.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CImg is a single-header C++ template image-processing library (CImg.h) used widely in research, imaging and tooling code. The affected routine parses the BMP BITMAPFILEHEADER/BITMAPINFOHEADER fields (file_size, offset, header_size, dx, dy, compression, nb_colors, bpp) byte-by-byte into 32-bit int variables, then derives the per-row byte count dx_bytes from the header width dx and bits-per-pixel bpp. Root cause is CWE-190 (integer overflow): a large attacker-controlled dx makes the truncated row-byte calculation wrap, so the computed buffer size buf_size is smaller than the data actually traversed, and the subsequent pixel read runs past the allocated heap buffer - an out-of-bounds read that both crashes the process and can place heap contents into the resulting image. The upstream fix commit b9ed613d9984f9caa1617b97e1db7e429cf14fd5 confirms the mechanism: header fields are now accumulated on 64-bit longT, dx_bytes/row_bytes/buf_size are computed in ulongT with explicit guards (row_bytes > fsiz, abs_dy > fsiz/row_bytes), data size is validated against offset and file size, file_size/header_size/offset/dx/dy are range-checked, bpp is whitelisted (1, 4, 8, 16, 24, 32), and compressed BMPs (BI_RLE8/BI_RLE4) from FILE* streams are rejected and redirected to load_other() before the size check. The trigger is a BMP whose header width is large enough to wrap the row byte count; the trigger for any specific downstream product depends on how that product routes untrusted files into the CImg BMP loader, which is not described in the available sources.
Know when Cimg gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
Attacker supplies a crafted BMP that the victim app must load, so AV:L and UI:R with no auth (PR:N); heap read discloses adjacent memory (C:L) and the OOB read crashes the process (A:H), with no integrity impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
CImg through 4.0.6 contains a heap out-of-bounds read vulnerability in the _load_bmp() function of CImg.h caused by an integer overflow in the row byte count. Attackers can supply a crafted BMP file with a large header width that wraps dx_bytes, causing crashes or heap memory disclosure into the decoded image.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
An issue in cimg.eu Cimg Library v2.9.3 allows an attacker to obtain sensitive information via a crafted JPEG file. Rate
A flaw was found in CImg in versions prior to 2.9.3. Rated high severity (CVSS 8.1), this vulnerability is remotely expl
A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library::CImg<unsigned char>::_lo
An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,
An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,
An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,
An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,
An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,
An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,
An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,
An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,
CImg The CImg Library v.2.3.3 and earlier is affected by: command injection. Rated critical severity (CVSS 9.8), this vu
EUVD-2026-110833
GHSA-88mq-c93j-j2w3
NVD
CVE.org
EPSS
Exploit-DB