CVE-2025-27796
NoneCVSS
—
EPSS
0.4%
Published
Mar 7, 2025
CISA due date
—
Cloudanix analysis
A flaw in image handling software can let attackers crash programs or potentially take control of systems by supplying a specially crafted image file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Out-of-bounds heap memory access caused by incorrect palette buffer allocation during WPG image parsing in ReadWPGImage.
Why it matters to the business
Applications processing untrusted images may crash or allow arbitrary code execution, increasing risk of service outages or system compromise; the issue affects widely used compiler toolchains on RHEL 8 with moderate downstream prevalence.
How an attack unfolds
An attacker crafts a malicious WPG image file that triggers improper buffer sizing in palette handling, causing ReadBlob to read or write beyond allocated heap memory when the image is opened by any application using the vulnerable GraphicsMagick library.
How to fix it
Update affected RHEL 8 packages to the listed fixed versions including clang 0:12.0.1-4.module+el8.5.0+13246+cefb5d4c and related compiler-rt/libomp/lld packages at their respective fixed builds; rebuild or recompile any dependent applications after upgrade.
How to confirm the fix worked
Verify package versions match or exceed the stated fixed builds using rpm or dnf; test image parsing with known-good and boundary WPG samples to confirm no crashes or abnormal memory behavior.
Typical attack path
- Attacker prepares a specially malformed WPG image file
- Victim application or service opens or processes the image using affected GraphicsMagick code
- ReadWPGImage mishandles palette buffer allocation leading to out-of-bounds access
- Memory corruption occurs enabling potential crash or code execution
How to detect it
Review application logs and crash reports for segmentation faults or heap errors when processing WPG files; monitor for unexpected process terminations involving image conversion or viewing tools.
What your security team should do
- Prioritize patching all listed RHEL 8 clang and related packages within standard change windows given the 582-day publication age and stable low EPSS
- Scan container and build images for the vulnerable package versions
- Add WPG image handling to allowed file type policies where feasible until patches are applied
The record
ReadWPGImage in WPG in GraphicsMagick before 1.3.46 mishandles palette buffer allocation, resulting in out-of-bounds access to heap memory in ReadBlob.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Chainguard | graphicsmagick | 0 | 1.3.46-r0 |
| Chainguard | graphicsmagick-compat | 0 | 1.3.46-r0 |
| Chainguard | graphicsmagick-cpp | 0 | 1.3.46-r0 |
| Chainguard | graphicsmagick-dev | 0 | 1.3.46-r0 |
| Chainguard | graphicsmagick-doc | 0 | 1.3.46-r0 |
| Debian:11 | graphicsmagick | 0 | No fix |
| Debian:12 | graphicsmagick | 0 | No fix |
| Debian:13 | graphicsmagick | 0 | No fix |
| Ubuntu:24.10 | graphicsmagick | 0 | 1.4+really1.3.45-1ubuntu0.1 |
| Wolfi | graphicsmagick | 0 | 1.3.46-r0 |
| Wolfi | graphicsmagick-compat | 0 | 1.3.46-r0 |
| Wolfi | graphicsmagick-cpp | 0 | 1.3.46-r0 |
| Wolfi | graphicsmagick-dev | 0 | 1.3.46-r0 |
| Wolfi | graphicsmagick-doc | 0 | 1.3.46-r0 |
| openSUSE:Tumbleweed | GraphicsMagick | 0 | 1.3.45-2.1 |
Related vulnerabilities
- CVE-2022-1270 In GraphicsMagick, a heap buffer overflow was found when parsing MIFF. Also affects graphicsmagick
- CVE-2019-12921 In GraphicsMagick before 1.3.32, the text filename component allows remote attackers to… Also affects graphicsmagick
- CVE-2018-20184 In GraphicsMagick 1.4 snapshot-20181209 Q8, there is a heap-based buffer overflow in the… Also affects graphicsmagick
- CVE-2017-17912 In GraphicsMagick 1.4 snapshot-20171217 Q8, there is a heap-based buffer over-read in… Also affects graphicsmagick
- CVE-2017-16545 The ReadWPGImage function in coders/wpg.c in GraphicsMagick 1.3.26 does not properly… Also affects graphicsmagick
- CVE-2017-16352 GraphicsMagick 1.3.26 is vulnerable to a heap-based buffer overflow vulnerability found… Also affects graphicsmagick
- CVE-2017-16353 GraphicsMagick 1.3.26 is vulnerable to a memory information disclosure vulnerability… Also affects graphicsmagick
- CVE-2017-15277 ReadGIFImage in coders/gif.c in ImageMagick 7.0.6-1 and GraphicsMagick 1.3.26 leaves the… Also affects graphicsmagick