Heap disclosure and crash via invalid GIF pointer
Published Mar 31, 2026 · Updated Mar 31, 2026
Heap buffer overflow in stb_image 2.30 and earlier allows local users to disclose heap data or crash a process via a crafted multi-frame GIF. stbi__load_gif_main computes the restore-to-previous two_back pointer before the heap buffer, and stbi__gif_load_next passes it to memcpy. Exploitation requires a low-privileged local user to make a host application decode the GIF through stbi_load_gif_from_memory; the published proof of concept demonstrates an out-of-bounds read rather than code execution.
Summary
What happened
Heap buffer overflow in stb_image 2.30 and earlier allows local users to disclose heap data or crash a process via a crafted multi-frame GIF. stbi__load_gif_main computes the restore-to-previous two_back pointer before the heap buffer, and stbi__gif_load_next passes it to memcpy. Exploitation requires a low-privileged local user to make a host application decode the GIF through stbi_load_gif_from_memory; the published proof of concept demonstrates an out-of-bounds read rather than code execution.
The record
- CVE
- CVE-2026-5185
- Published
- Mar 31, 2026
- Updated
- Mar 31, 2026
- Vendor
- Sean Barrett
- Product
- stb_image
- Classifications
- CWE-119, CWE-122, T1203
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Mar 31, 2026CVE publishedPublication date reported by the CVE source.
- Mar 31, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=2.0
- Affected versionversion=2.1
- Affected versionversion=2.10
- Affected versionversion=2.11
- Affected versionversion=2.12
- Affected versionversion=2.13
- Affected versionversion=2.14
- Affected versionversion=2.15
- Affected versionversion=2.16
- Affected versionversion=2.17
- Affected versionversion=2.18
- Affected versionversion=2.19
- Affected versionversion=2.2
- Affected versionversion=2.20
- Affected versionversion=2.21
- Affected versionversion=2.22
- Affected versionversion=2.23
- Affected versionversion=2.24
- Affected versionversion=2.25
- Affected versionversion=2.26
- Affected versionversion=2.27
- Affected versionversion=2.28
- Affected versionversion=2.29
- Affected versionversion=2.3
- Affected versionversion=2.30
- Affected versionversion=2.4
- Affected versionversion=2.5
- Affected versionversion=2.6
- Affected versionversion=2.7
- Affected versionversion=2.8
- Affected versionversion=2.9
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Crafted multi-frame GIF proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo