Read the docs
TI-2026-30477 Aliases CVE-2026-42146

CImg Library: Uncontrolled memory allocation via nb_colors field in _load_bmp

Priority MEDIUM 58CWE-789Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
No fix listed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-789.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00182 7th percentileScored 2026-11-07
Fix No fix listed No fixed version in the sources yet

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
GreycLabCImg< c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3—No fix listedCNA
  • CImg VendorGreycLab Affected < c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3 Fixed in — No fix listed CNA

Remediation

No fixed version listed by the sources yet.

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-42146

References

  • TI-2026-35174 CImg Library: Uncontrolled Memory Allocation and Memory Leak in `_load_analyze()` via Crafted NIfTI/Analyze Header CVSS 3.1HIGH 7.5
  • TI-2026-81159 Heap out-of-bounds read in GreycLab CImg BMP loader CVSS 4.0MEDIUM 6.9
  • TI-2026-30475 CImg Library: Integer overflow in PNM size check bypasses memory guard (_load_pnm) CVSS 3.1MEDIUM 6.1

Sources