Cloudanix VulnDB

CVE-2023-45661

High · 7.1

CVSS

7.1

EPSS

0.6%

Published

Oct 21, 2023

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in an image processing library can let a specially made picture reveal hidden memory details or cause crashes when opened by programs that use it.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Data Exposure
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Out-of-bounds memcpy read in stbi__gif_load_next when two_back points below buffer start during GIF processing, enabling memory information disclosure.

Why it matters to the business

Applications processing untrusted images may leak internal memory details or crash, increasing exposure to targeted attacks and potential service disruption.

How an attack unfolds

An attacker crafts a malicious GIF image that manipulates buffer pointers, then supplies it to an affected application using stb_image for loading; the library performs an out-of-bounds read during GIF frame handling, disclosing memory layout information.

How to fix it

Replace the stb_image.h header with a patched version that corrects the pointer bounds check in GIF loading; rebuild and redeploy all dependent applications; consider sandboxing image processing until updates are applied.

How to confirm the fix worked

Test with the original crafted GIF sample to confirm absence of out-of-bounds access; review application logs and memory sanitizers for read violations during GIF handling; verify header version and checksum against known good release.

Typical attack path

  1. Craft malicious GIF with invalid two_back pointer
  2. Deliver image via file, download, or upload to target application
  3. Application invokes stbi__gif_load_next on the file
  4. Out-of-bounds read occurs and leaks memory allocation details

How to detect it

Monitor application crash reports and memory sanitizer logs for out-of-bounds reads during GIF processing; inspect file access logs for unexpected GIF files preceding abnormal behavior.

What your security team should do

  • Inventory all products and builds embedding stb_image.h and prioritize replacement
  • Apply updated header immediately upon release and recompile affected components
  • Restrict image loading to trusted sources or add runtime bounds checking where feasible

The record

stb_image is a single file MIT licensed library for processing images. A crafted image file may trigger out of bounds memcpy read in `stbi__gif_load_next`. This happens because two_back points to a memory address lower than the start of the buffer out. This issue may be used to leak internal memory allocation information.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 libstb 0 No fix
Debian:12 libstb 0 No fix
Debian:13 libstb 0 No fix
Ubuntu:20.04:LTS libstb 0 No fix
Ubuntu:22.04:LTS libstb 0 No fix
Ubuntu:24.04:LTS libstb 0 No fix
Ubuntu:24.10 libstb 0 No fix
Ubuntu:25.04 libstb 0 No fix
Ubuntu:25.10 libstb 0 No fix
Ubuntu:Pro:20.04:LTS libstb 0 No fix

Related vulnerabilities