Out-of-Memory Condition in CImg Library Affects Image Processing Applications
CVE-2026-42146
5.5MEDIUM
What is CVE-2026-42146?
The CImg Library, utilized for image processing, is susceptible to an out-of-memory condition when reading BMP files with a manipulated nb_colors value. Prior to a specific commit c3aacf5, the library failed to validate the nb_colors field against the file size, which could lead to application crashes when untrusted BMP files are processed. This issue has been addressed in updates, ensuring better handling of BMP files to safeguard against such vulnerabilities.
Affected Version(s)
CImg < c3aacf5b96ac1e54b7af1957c6737dbf3949f6d3
