Cloudanix VulnDB

CVE-2023-47995

Medium · 6.5

CVSS

6.5

EPSS

0.7%

Published

Jan 9, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A problem in a widely used image library can let attackers crash programs that open pictures by forcing them to request far more memory than the system can provide.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The flaw permits an attacker-supplied size value to trigger an excessively large memory allocation inside FreeImage_AllocateBitmap, exhausting available memory and terminating the process.

Why it matters to the business

Applications and services that rely on the affected image library become unavailable when processing untrusted input, causing operational disruption and potential loss of image-handling functionality until the process is restarted.

How an attack unfolds

An attacker crafts a specially formed image or bitmap header containing an oversized dimension or allocation request, sends it to any application using the vulnerable library, and causes the allocation call to request an impractically large block that the operating system cannot satisfy, resulting in a crash.

How to fix it

Upgrade to a patched release of the FreeImage library once available; in the interim, implement input-size validation and resource limits before calling image-loading routines, or replace the library with a maintained alternative.

How to confirm the fix worked

Rebuild or re-deploy the affected application with the updated library, then attempt to load both benign and boundary-case images while monitoring memory usage and process stability to confirm the excessive-allocation path is no longer reachable.

Typical attack path

  1. Identify a target application that loads images via the vulnerable library
  2. Prepare a malicious bitmap file with an extreme width or height value
  3. Deliver the file through network, file upload, or local storage
  4. Trigger parsing of the file which reaches FreeImage_AllocateBitmap
  5. Observe process termination due to allocation failure

How to detect it

Review application and system logs for abrupt process terminations or out-of-memory events immediately after image-file processing; correlate with file-upload or image-load timestamps and inspect any crash dumps for allocation requests originating from BitmapAccess.cpp.

What your security team should do

  • Inventory all products and containers that statically or dynamically link the FreeImage library
  • Apply vendor updates or backported patches as soon as they are released
  • Add defensive input sanitization around image decoding entry points
  • Monitor EPSS and exploit-maturity indicators for any future rise in risk

The record

Memory Allocation with Excessive Size Value discovered in BitmapAccess.cpp::FreeImage_AllocateBitmap in FreeImage 3.18.0 allows attackers to 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
Mageia:9 freeimage 0 3.18.0-10.1.mga9
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