CVE-2016-5684
High · 7.8CVSS
7.8
EPSS
1.8%
Published
Jan 6, 2017
CISA due date
—
Cloudanix analysis
A flaw in a common image-processing tool lets attackers take over a computer simply by getting it to open a specially made picture file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Out-of-bounds write in FreeImage XMP parsing allows arbitrary memory overwrite leading to remote code execution when a malicious image is processed.
Why it matters to the business
Attackers can take control of any application or system that uses the vulnerable library to open images, enabling data theft, ransomware deployment, or further network compromise; the library's widespread use in imaging tools increases exposure across many environments.
How an attack unfolds
An attacker crafts a malicious XMP section inside an image file and supplies it to any application relying on FreeImage; when the library parses the XMP data an out-of-bounds write occurs, allowing the attacker to overwrite memory and execute arbitrary code.
How to fix it
Replace FreeImage with a maintained fork or alternative library that has addressed the XMP parsing issue; rebuild all dependent applications against the fixed library; isolate or sandbox image-processing components until remediation is complete.
How to confirm the fix worked
Scan source and binary dependencies for the FreeImage library version; attempt to process known-malicious XMP test images in a controlled environment and verify absence of crashes or unexpected memory writes.
Typical attack path
- Attacker creates specially crafted XMP image file
- Victim or automated process opens the image with a FreeImage-dependent application
- Library parses XMP data and performs out-of-bounds write
- Memory corruption leads to attacker-controlled code execution
How to detect it
Review application logs and crash reports for unexpected terminations or memory errors during image loading; search file-system and package repositories for presence of the FreeImage library; monitor process creation events following image-handling activity.
What your security team should do
- Inventory all products and services that statically or dynamically link FreeImage
- Prioritize replacement or patching of the library in any internet-facing or high-value image-processing workflows
- Add FreeImage to the list of libraries monitored for future vulnerability disclosures
The record
An exploitable out-of-bounds write vulnerability exists in the XMP image handling functionality of the FreeImage library. A specially crafted XMP file can cause an arbitrary memory overwrite resulting in code execution. An attacker can provide a malicious image to trigger this vulnerability.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | freeimage | 0 | 3.17.0+ds1-3 |
| Debian:12 | freeimage | 0 | 3.17.0+ds1-3 |
| Debian:13 | freeimage | 0 | 3.17.0+ds1-3 |
| Debian:14 | freeimage | 0 | 3.17.0+ds1-3 |
| Debian:7 | freeimage | 0 | 3.15.1-1.1+deb7u1 |
| Debian:8 | freeimage | 0 | 3.15.4-4.2+deb8u1 |
| Mageia:5 | freeimage | 0 | 3.154-1.2.mga5 |
| Ubuntu:14.04:LTS | freeimage | 0 | 3.15.4-3ubuntu0.1 |
| Ubuntu:16.04:LTS | freeimage | 0 | 3.17.0+ds1-2ubuntu0.1 |
| openSUSE:Tumbleweed | freeimage | 0 | 3.18.0-4.4 |
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