CVE-2024-53901
Medium · 5.5CVSS
5.5
EPSS
0.4%
Published
Nov 24, 2024
CISA due date
—
Cloudanix analysis
A flaw in a popular Perl image-handling library can make programs crash when they try to clean up certain specially made pictures.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow triggered when the trim() method processes a crafted image input, enabling denial of service or potential further memory corruption.
Why it matters to the business
Applications relying on the Imager Perl module for image processing may experience crashes or instability when handling untrusted image data, leading to service outages and increased operational overhead until patched.
How an attack unfolds
An attacker supplies a maliciously crafted image file to any application using the vulnerable Imager package; when the trim() method is invoked on that image, the buffer overflow occurs.
How to fix it
Upgrade tonycoz/imager to the fixed commit a98aabc78c74d61f1db25d0f1c1e9a2b14eb5f40 or later version 1.025 or newer; rebuild and redeploy dependent Perl applications.
How to confirm the fix worked
Confirm the installed Imager version is 1.025 or newer, or verify the presence of commit a98aabc78c74d61f1db25d0f1c1e9a2b14eb5f40 in the source; test trim() against known-bad crafted images in a controlled environment to ensure no crash occurs.
Typical attack path
- Identify an application or service that accepts image uploads or processes external images using the Imager Perl module.
- Craft a malformed image designed to trigger the buffer overflow in trim().
- Deliver the image to the target application and trigger the trim() operation.
- Observe denial-of-service crash or attempt to leverage memory corruption for additional impact.
How to detect it
Review application logs and crash dumps for segmentation faults or buffer-related errors originating from Imager trim operations on image-processing endpoints; correlate with unexpected image upload activity.
What your security team should do
- Immediately audit all Perl codebases and containers for use of Imager < 1.025 and schedule upgrades.
- Prioritize patching in any internet-facing or high-volume image-processing services due to potential denial-of-service exposure.
- Add dependency scanning to CI/CD pipelines to prevent reintroduction of vulnerable Imager versions.
- Monitor EPSS trend and watch for emerging exploit code given the public disclosure.
The record
The Imager package before 1.025 for Perl has a heap-based buffer overflow leading to denial of service, or possibly unspecified other impact, when the trim() method is called on a crafted input image.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | libimager-perl | 0 | No fix |
| Debian:12 | libimager-perl | 0 | No fix |
| Debian:13 | libimager-perl | 0 | 1.025+dfsg-1 |
| Debian:14 | libimager-perl | 0 | 1.025+dfsg-1 |
| Ubuntu:16.04:LTS | libimager-perl | 0 | No fix |
| Ubuntu:18.04:LTS | libimager-perl | 0 | No fix |
| Ubuntu:20.04:LTS | libimager-perl | 0 | No fix |
| Ubuntu:22.04:LTS | libimager-perl | 0 | No fix |
| Ubuntu:24.04:LTS | libimager-perl | 0 | No fix |
| Ubuntu:24.10 | libimager-perl | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | libimager-perl | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | libimager-perl | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | libimager-perl | 0 | No fix |