Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCreate malicious BMP file
-
DeliveryDeliver file to target (upload, email, USB)
-
ExploitVictim opens file with CImg application
-
InstallCImg reads unchecked nb_colors field
-
C2Allocates excessive memory
-
ExecuteSystem runs out of memory
-
ImpactApplication crashes
-
Step 8Denial of service achieved
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
|
| Exploitation Conditions | The vulnerability requires three specific conditions: (1) The target application must use CImg Library (statically linked or header-only) from a version prior to 3.7.5 to load BMP files; (2) The BMP file must have a crafted nb_colors field value that exceeds the valid range (greater than 2^bpp for bpp < 16, or any large value causing memory exhaustion); (3) A user or automated process must attempt to open or process the malicious BMP file. The vulnerability does NOT trigger on default, valid BMP files. It is NOT exploitable remotely unless the application exposes BMP loading over a network interface (e.g., an image upload web service), in which case remote attackers could craft and submit malicious files. Local exploitation requires file system or application access to provide the malicious BMP. |
| Impact | This is a localized denial-of-service vector with moderate real-world risk despite the 5.5 CVSS score. The attack vector is local (AV:L) and requires user interaction (UI:R) - the victim must open a crafted BMP file - which significantly limits automated exploitation. However, the availability impact is high (A:H), guaranteeing application crash. The CVSS score appropriately reflects this: higher than typical DoS (due to guaranteed impact) but lower than remote or privileged exploits. The lack of confidentiality or integrity impact (C:N/I:N) further confirms pure availability damage. Real-world risk depends on deployment context: applications that automatically process untrusted BMP files from user uploads, email attachments, or web sources face genuine risk; air-gapped or controlled-input environments face minimal risk. No active exploitation signals (no KEV, no POC identified) suggest this remains a low-priority issue for most organizations, but should be addressed during normal patch cycles, especially for software that processes user-supplied images. |
| Exploit ScenarioDerived | An attacker creates a malicious BMP file with an oversized nb_colors field in the header (e.g., 0xFFFFFFFF) while keeping the file size small. When a user or automated process opens this file in an application using CImg for image loading, CImg attempts to allocate gigabytes of memory based on the unchecked header value, exhausting system memory and crashing the application. This is particularly effective against web applications or services that process user-uploaded images without pre-validation. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 04, 2026
Denial of service in CImg Library prior to version 3.7.5 allows local attackers to crash applications via crafted BMP files with oversized nb_colors header fields. The vulnerability stems from unchecked allocation of memory based on user-supplied file header data, causing out-of-memory conditions when loading untrusted BMP files. No authentication or network access required; user interaction (file opening) is the sole prerequisite.
RemediationAI
Upgrade to CImg Library version 3.7.5 or later, which includes the fix from commit c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3. For applications embedding CImg.h as a header-only library, update the CImg.h file from the CImg GitHub repository (https://github.com/GreycLab/CImg/releases/tag/v.3.7.5). If immediate upgrade is not feasible, implement input validation at the application layer: reject BMP files with nb_colors values exceeding the theoretical maximum (2^bpp for bpp < 16) or larger than the declared file size. Additionally, consider sandboxing or rate-limiting image processing operations to mitigate resource exhaustion impact. Note that disabling BMP format support entirely eliminates the attack surface but may impact feature completeness.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CImg is a C++ header-only library for image processing and manipulation. The vulnerability exists in BMP file parsing code within CImg.h, specifically in the image loading routine that reads the BMP color palette header field (nb_colors). The library uses this value directly to allocate memory for the palette without validating it against either the declared bits-per-pixel (bpp) or the remaining file size. For bpp values less than 16, the maximum valid palette size should be 2^bpp colors; the patch enforces this constraint. The root cause is CWE-789 (Memory Allocation with Excessive Size Value), where untrusted input directly determines allocation size without bounds checking.
Know when the next one hits your stack
- 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
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Primary rating from Vendor (github) · only source for this CVE.
CVSS VectorVendor: github
DescriptionCVE.org
CImg Library is a C++ library for image processing. Prior to commit c3aacf5, the nb_colors field read from the BMP file header is used directly to compute an allocation size without validating it against the remaining file size. A crafted BMP file with a large nb_colors value triggers an out-of-memory condition, crashing any application that uses CImg to load untrusted BMP files. This issue has been patched via commit c3aacf5.
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
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-27077
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB