Skip to main content

Stb Image CVE-2026-5185

| EUVDEUVD-2026-17337 LOW
Heap-based Buffer Overflow (CWE-122)
2026-03-31 VulDB GHSA-ccf6-mw22-wphc
1.9
CVSS 4.0 · NVD
View

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Impact

The CVSS 3.1 score of 5.3 reflects moderate risk with an attack vector of Local (AV:L), low complexity (AC:L), and low privilege requirements (PR:L), indicating an authenticated local user can trigger the vulnerability without special conditions. The EPSS exploitation probability marker (E:P) combined with publicly available exploit code (POC=YES) elevates practical risk. However, the requirement for local access and authenticated privilege substantially restricts the threat surface compared to network-based vulnerabilities. SSVC framework analysis: exploitation is proven (public POC), automatable at moderate complexity (GIF file crafting), but technical impact is limited (C:L, I:L, A:L)-memory corruption rather than guaranteed code execution. This is a real concern for applications that process untrusted GIF files in multi-user systems or containers where privilege boundaries matter, but not an immediate critical priority for single-user or air-gapped deployments.

Exploit ScenarioDerived

A local authenticated user on a shared system crafts a malicious multi-frame GIF file and uploads it to an application using stb_image for processing (e.g., an image converter service or media gallery). When the application calls stbi__gif_load_next to parse the GIF frames, the overflow corrupts heap memory, potentially crashing the application or, in carefully constructed payloads, achieving limited information disclosure or integrity compromise. The attack requires direct file access to the vulnerable parsing function, making it most practical in environments where multiple users share a system or where untrusted GIF inputs are processed server-side.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 31, 2026

Heap-based buffer overflow in Nothings stb_image library up to version 2.30 in the stbi__gif_load_next function allows local authenticated attackers to cause memory corruption with limited confidentiality, integrity, and availability impact. Public exploit code is available; however, the vulnerability requires local access and authenticated privilege level, significantly limiting real-world exploitation scope. The vendor has not responded to early disclosure attempts.

RemediationAI

Upgrade stb_image to a version after 2.30 once the vendor releases a patched version. At the time of this analysis, the vendor has not confirmed patch availability or a specific fix version; monitor the official stb_image repository and VulDB references for release notices. As an interim workaround, disable GIF multi-frame processing in applications, restrict file loading to trusted sources, or implement external GIF validation before passing to stb_image. Developers embedding stb_image should review their use case and privilege model to determine if local authenticated access is realistically possible in their threat model.

Affected VersionsENISA

stb_image 2.28
stb_image 2.26
stb_image 2.0
stb_image 2.11
stb_image 2.5
stb_image 2.14
stb_image 2.25
stb_image 2.7
stb_image 2.6
stb_image 2.23
stb_image 2.10
stb_image 2.2
stb_image 2.22
stb_image 2.18
stb_image 2.8
stb_image 2.21
stb_image 2.19
stb_image 2.29
stb_image 2.16
stb_image 2.30
stb_image 2.17
stb_image 2.9
stb_image 2.24
stb_image 2.1
stb_image 2.12
stb_image 2.3
stb_image 2.4
stb_image 2.20
stb_image 2.13
stb_image 2.27
stb_image 2.15

Affected Packages

euvd stb_image no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

stb_image is a popular single-header C library for image loading and processing. The vulnerability exists in the multi-frame GIF file handler component, specifically in the stbi__gif_load_next function within stb_image.h. The root cause is classified as CWE-122 (Heap-based Buffer Overflow), indicating improper bounds checking when processing GIF frame data during sequential frame loading. The heap corruption occurs when parsing specially crafted multi-frame GIF files, allowing memory writes beyond allocated buffer boundaries. This is a memory safety issue inherent to C-based image parsing without robust input validation.

Know when Stb Image gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 1.9 LOW
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
SUSE 4.3 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
Severity Changed
Apr 29, 2026 - 01:11 NVD
MEDIUM LOW
CVSS changed
Apr 29, 2026 - 01:11 NVD
4.8 (MEDIUM) 1.9 (LOW)
Patch released
Mar 31, 2026 - 21:13 nvd
Patch available
CVE Published
Mar 31, 2026 - 06:45 nvd
MEDIUM 4.8

DescriptionCVE.org

A security flaw has been discovered in Nothings stb_image up to 2.30. This affects the function stbi__gif_load_next of the file stb_image.h of the component Multi-frame GIF File Handler. The manipulation results in heap-based buffer overflow. The attack requires a local approach. The exploit has been released to the public and may be used for attacks. The vendor was contacted early about this disclosure but did not respond in any way.

Threat Intelligence Overview

EPSS Score
0.0%
Top 98% exploitable
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

Related Vulnerabilities in Nothings stb_image Buffer Overflow Flaws

View all 2

Vendor StatusVendor

Debian

libstb
Release Status Fixed Version Urgency
bullseye vulnerable 0.0~git20200713.b42009b+ds-1 -
bullseye (security) vulnerable 0.0~git20200713.b42009b+ds-1+deb11u1 -
bookworm vulnerable 0.0~git20220908.8b5f1f3+ds-1 -
trixie vulnerable 0.0~git20241109.5c20573+ds-1 -
forky, sid vulnerable 0.0~git20250907.fede005+ds-1 -
(unstable) fixed (unfixed) -

SUSE

Severity: Medium

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy