Skip to main content

CImg EUVDEUVD-2026-110833

| CVE-2026-117555 MEDIUM
Integer Overflow or Wraparound (CWE-190)
2026-10-27 VulnCheck GHSA-88mq-c93j-j2w3
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft BMP with overflowing header width
  2. Delivery
    Deliver file to a CImg-based application
  3. Exploit
    Trigger integer overflow in _load_bmp() row byte count
  4. Execution
    Heap out-of-bounds read during pixel decode
  5. Impact
    Crash 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

CImg 0 ≤4.0.6

Affected Packages

euvd cimg no fix

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

Vendor (VulnCheck) PRIMARY 6.9 MEDIUM
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
vuln.today AI 6.1 MEDIUM

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.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
popular header-only C++ imaging library, niche versus OpenCV/ImageMagick
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

More in Cimg

View all
CVE-2023-41484 HIGH POC
8.1 Sep 20

An issue in cimg.eu Cimg Library v2.9.3 allows an attacker to obtain sensitive information via a crafted JPEG file. Rate

CVE-2020-25693 HIGH POC
8.1 Dec 03

A flaw was found in CImg in versions prior to 2.9.3. Rated high severity (CVSS 8.1), this vulnerability is remotely expl

CVE-2024-26540 HIGH POC
7.8 Mar 15

A heap-based buffer overflow in Clmg before 3.3.3 can occur via a crafted file to cimg_library::CImg<unsigned char>::_lo

CVE-2018-7641 HIGH POC
7.8 Mar 02

An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,

CVE-2018-7640 HIGH POC
7.8 Mar 02

An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,

CVE-2018-7639 HIGH POC
7.8 Mar 02

An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,

CVE-2018-7638 HIGH POC
7.8 Mar 02

An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,

CVE-2018-7637 HIGH POC
7.8 Mar 02

An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,

CVE-2018-7589 HIGH POC
7.8 Mar 01

An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,

CVE-2018-7588 HIGH POC
7.8 Mar 01

An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,

CVE-2018-7587 HIGH POC
7.8 Mar 01

An issue was discovered in CImg v.220. Rated high severity (CVSS 7.8), this vulnerability is no authentication required,

CVE-2019-1010174 CRITICAL
9.8 Jul 25

CImg The CImg Library v.2.3.3 and earlier is affected by: command injection. Rated critical severity (CVSS 9.8), this vu

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy