CVE-2026-42144: CWE-190: Integer Overflow or Wraparound in GreycLab CImg
CVE-2026-42144 is an integer overflow vulnerability in the CImg library used for image processing. The flaw occurs in the size calculation of image dimensions within the _load_pnm() function, where large dimension values cause an overflow that bypasses memory allocation checks. This results in an undersized buffer allocation and can lead to a heap buffer overflow when loading crafted PNM/PGM/PPM image files. The vulnerability affects all versions of CImg prior to commit 4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d. A patch addressing this issue has been committed. The CVSS score is 6.1, indicating a medium severity level. No known exploits are reported in the wild, and the product is not a cloud service.
AI Analysis
Technical Summary
The CImg library contains an integer overflow vulnerability (CWE-190) in the _load_pnm() function prior to commit 4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d. This overflow occurs during the multiplication of image dimensions (width, height, depth) for memory allocation, allowing an attacker to craft a PNM/PGM/PPM image file with large dimension values that cause the size calculation to wrap around. This leads to allocation of a buffer smaller than required, potentially triggering a heap buffer overflow when the image is processed. The issue affects any application using vulnerable versions of CImg to load untrusted image files. The vulnerability has been patched in the specified commit.
Potential Impact
Successful exploitation can cause a heap buffer overflow, which may lead to application crashes or potentially enable an attacker to execute arbitrary code or cause denial of service. The impact is limited to applications using vulnerable versions of CImg to load untrusted PNM/PGM/PPM image files. The CVSS score of 6.1 reflects a medium severity with local attack vector, low attack complexity, no privileges required, and user interaction needed. There are no known exploits in the wild at this time.
Mitigation Recommendations
A patch addressing this vulnerability has been committed in CImg at commit 4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d. Users and developers should update to this fixed version or later to remediate the issue. Since this is a library vulnerability, applications using CImg should incorporate the patched library version before processing untrusted image files. No additional vendor advisory is available; patch status is confirmed by the commit reference.
CVE-2026-42144: CWE-190: Integer Overflow or Wraparound in GreycLab CImg
Description
CVE-2026-42144 is an integer overflow vulnerability in the CImg library used for image processing. The flaw occurs in the size calculation of image dimensions within the _load_pnm() function, where large dimension values cause an overflow that bypasses memory allocation checks. This results in an undersized buffer allocation and can lead to a heap buffer overflow when loading crafted PNM/PGM/PPM image files. The vulnerability affects all versions of CImg prior to commit 4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d. A patch addressing this issue has been committed. The CVSS score is 6.1, indicating a medium severity level. No known exploits are reported in the wild, and the product is not a cloud service.
CVSS v3.1
Score 6.1medium
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The CImg library contains an integer overflow vulnerability (CWE-190) in the _load_pnm() function prior to commit 4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d. This overflow occurs during the multiplication of image dimensions (width, height, depth) for memory allocation, allowing an attacker to craft a PNM/PGM/PPM image file with large dimension values that cause the size calculation to wrap around. This leads to allocation of a buffer smaller than required, potentially triggering a heap buffer overflow when the image is processed. The issue affects any application using vulnerable versions of CImg to load untrusted image files. The vulnerability has been patched in the specified commit.
Potential Impact
Successful exploitation can cause a heap buffer overflow, which may lead to application crashes or potentially enable an attacker to execute arbitrary code or cause denial of service. The impact is limited to applications using vulnerable versions of CImg to load untrusted PNM/PGM/PPM image files. The CVSS score of 6.1 reflects a medium severity with local attack vector, low attack complexity, no privileges required, and user interaction needed. There are no known exploits in the wild at this time.
Mitigation Recommendations
A patch addressing this vulnerability has been committed in CImg at commit 4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d. Users and developers should update to this fixed version or later to remediate the issue. Since this is a library vulnerability, applications using CImg should incorporate the patched library version before processing untrusted image files. No additional vendor advisory is available; patch status is confirmed by the commit reference.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-24T17:15:21.834Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69f8e3e0cbff5d86103e4663
Added to database: 5/4/2026, 6:22:24 PM
Last enriched: 5/12/2026, 6:24:50 AM
Last updated: 6/18/2026, 5:21:14 PM
Views: 85
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.