CVE-2026-5185
Heap-Based Buffer Overflow in stb_image Multi-Frame GIF Handler
Publication date: 2026-03-31
Last updated on: 2026-04-29
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| nothing | sbt_image | to 2.30 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-119 | The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. |
| CWE-122 | A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a security flaw found in the stb_image library, specifically in the function stbi__gif_load_next within the Multi-frame GIF File Handler component. It causes a heap-based buffer overflow, which means that the program writes more data to a buffer located in the heap than it can hold, potentially leading to memory corruption.
The flaw affects versions of stb_image up to 2.30 and requires local access to exploit. The exploit code has been publicly released, making it easier for attackers to use this vulnerability.
How can this vulnerability impact me? :
This vulnerability can lead to a heap-based buffer overflow, which may allow an attacker with local access to corrupt memory. This could result in unexpected behavior such as application crashes or potentially allow the attacker to execute arbitrary code with the privileges of the affected application.
Since the exploit is publicly available, the risk of exploitation is higher, especially in environments where local access is possible.