CVE-2026-42146 — CImg Library is a C++ library for image processing. Prior
CVE-2026-42146 — 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 trigge
What This Means For You
- If your environment is affected by CWE-789, review your exposure and prioritize patching based on your environment. Monitor vendor advisories for CVE-2026-42146 updates and patches.
Related ATT&CK Techniques
🛡️ Detection Rules
2 rules · 6 SIEM formats2 detection rules auto-generated for this incident, mapped to MITRE ATT&CK. Sigma YAML is free — export to any SIEM format via the Intel Bot.
Potential CImg Library Out-of-Memory via Crafted BMP - CVE-2026-42146
title: Potential CImg Library Out-of-Memory via Crafted BMP - CVE-2026-42146
id: scw-2026-05-04-ai-1
status: experimental
level: medium
description: |
Detects processes like CImg.exe or ImageMagick.exe (which may use CImg) being launched with a .bmp file, potentially indicating an attempt to exploit CVE-2026-42146 by loading a crafted BMP file that triggers an out-of-memory condition. This rule focuses on the execution path where a user might be tricked into opening such a file.
author: SCW Feed Engine (AI-generated)
date: 2026-05-04
references:
- https://shimiscyberworld.com/posts/nvd-CVE-2026-42146/
tags:
- attack.execution
- attack.t1204.002
logsource:
category: process_creation
detection:
selection:
Image|endswith:
- 'CImg.exe'
- 'ImageMagick.exe'
ParentImage|contains:
- 'explorer.exe'
CommandLine|contains:
- '.bmp'
selection_criteria:
condition: selection
condition: selection_criteria
falsepositives:
- Legitimate administrative activity
Source: Shimi's Cyber World · License & reuse
Indicators of Compromise
| ID | Type | Indicator |
|---|---|---|
| CVE-2026-42146 | vulnerability | CVE-2026-42146 |
| CWE-789 | weakness | CWE-789 |
Source & Attribution
| Source Platform | NVD |
| Channel | National Vulnerability Database |
| Published | May 04, 2026 at 21:16 UTC |
This content was curated and summarized by Shimi's Cyber World for informational purposes. It is not copied or republished in full. All intellectual property rights remain with the original author and source.
Believe this infringes your rights? Submit a takedown request.