CVE-2023-47996
Medium · 6.5CVSS
6.5
EPSS
0.7%
Published
Jan 9, 2024
CISA due date
—
Cloudanix analysis
A flaw in a common image processing tool can let attackers crash programs or leak information simply by providing a specially made picture file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Integer overflow in jpeg_read_exif_dir during EXIF directory parsing allows out-of-bounds memory access or excessive allocation when processing malformed JPEG images, enabling information disclosure or denial of service.
Why it matters to the business
Applications using FreeImage for image processing may crash or leak data when handling attacker-supplied images, leading to service disruption, potential data exposure, and operational downtime in image-dependent workflows.
How an attack unfolds
An attacker creates a JPEG with crafted EXIF metadata designed to trigger the integer overflow during directory parsing; the image is delivered to a target application that uses the vulnerable FreeImage library, causing the overflow upon processing.
How to fix it
Upgrade FreeImage to a version containing a fix for the integer overflow in Exif.cpp if one becomes available; otherwise replace the library with a maintained alternative and validate all image inputs before processing.
How to confirm the fix worked
Test image parsing with known malformed EXIF samples in a controlled environment, monitor for crashes or memory errors, and verify that EXIF directory handling no longer produces overflows on edge-case inputs.
Typical attack path
- Craft a malicious JPEG containing malformed EXIF data to trigger integer overflow
- Deliver the image to the victim via email, web upload, or shared storage
- Victim application invokes FreeImage to load and parse the JPEG EXIF directory
- Overflow results in crash or unauthorized memory access
How to detect it
Search application and system logs for repeated crashes or high memory usage during JPEG processing, review any available crash dumps for references to Exif.cpp or jpeg_read_exif_dir, and inspect network or file logs for unexpected image uploads around the time of incidents.
What your security team should do
- Prioritize replacement or patching of FreeImage in all image-processing pipelines due to available exploit code
- Implement sandboxing or input sanitization around image handling code
- Review and reduce reliance on the affected library across the software supply chain
- Monitor upstream project for security updates given the multi-year disclosure timeline
The record
An integer overflow vulnerability in Exif.cpp::jpeg_read_exif_dir in FreeImage 3.18.0 allows attackers to obtain information and cause a denial of service.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | freeimage | 0 | No fix |
| Debian:12 | freeimage | 0 | No fix |
| Debian:13 | freeimage | 0 | No fix |
| Ubuntu:20.04:LTS | freeimage | 0 | No fix |
| Ubuntu:22.04:LTS | freeimage | 0 | No fix |
| Ubuntu:24.04:LTS | freeimage | 0 | No fix |
| Ubuntu:24.10 | freeimage | 0 | No fix |
| Ubuntu:25.04 | freeimage | 0 | No fix |
| Ubuntu:25.10 | freeimage | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | freeimage | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | freeimage | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | freeimage | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | freeimage | 0 | No fix |
Related vulnerabilities
- CVE-2024-9029 A flaw was found in the freeimage library. Also affects freeimage
- CVE-2024-31570 In FreeImage library version 3.19.0 [r1909], when reading images in XPM format, the… Also affects freeimage
- CVE-2024-28583 Buffer Overflow vulnerability in open source FreeImage v.3.19.0 [r1909] allows a local… Also affects freeimage
- CVE-2024-28584 Null Pointer Dereference vulnerability in open source FreeImage v.3.19.0 [r1909] allows a… Also affects freeimage
- CVE-2024-28578 Buffer Overflow vulnerability in open source FreeImage v.3.19.0 [r1909] allows a local… Also affects freeimage
- CVE-2024-28579 Buffer Overflow vulnerability in open source FreeImage v.3.19.0 [r1909] allows a local… Also affects freeimage
- CVE-2024-28580 Buffer Overflow vulnerability in open source FreeImage v.3.19.0 [r1909] allows a local… Also affects freeimage
- CVE-2024-28582 Buffer Overflow vulnerability in open source FreeImage v.3.19.0 [r1909] allows a local… Also affects freeimage