Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit image with malicious dimensions
-
DeliveryReach stbi_write_* encoder with untrusted size params
-
ExploitTrigger CWE-190 overflow in size math
-
ExecutionUndersized heap allocation
-
ImpactOut-of-bounds write / memory corruption
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
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. |
| Exploitation Conditions | Exploitation requires an application that calls stb_image_write.h's stbi_write_png_to_mem, stbi_write_jpg_core, or stbi_write_tga_core (stb up to version 1.16) with attacker-influenced image parameters - specifically width, height, or channel/component counts that make the internal size computation overflow. The limiting factor is reachability: the vulnerable code path is an image ENCODER, so the attacker must be able to control the dimensions/pixel-buffer sizing passed to the write routine (e.g., an upload/convert/re-encode feature), rather than merely reaching a network port. No authentication is modeled in the vector (PR:N) and no user interaction (UI:N), but real-world exposure depends on whether the host application feeds untrusted sizing into these functions. |
| Impact | This is a genuine but modest-severity issue. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) with impacts limited to VI:L/VA:L yields 6.9 (Medium), and the E:P (Proof-of-Concept) exploit-maturity flag aligns with the confirmed public exploit. There is NO EPSS score and NO CISA KEV listing provided, so there is no evidence of active or automated exploitation - publicly available exploit code exists, but that is a distinct signal from active exploitation. The low integrity/availability sub-scores are appropriate: a CWE-190 integer overflow in image ENCODING functions typically produces an undersized allocation and heap out-of-bounds write, tending toward crashes/memory corruption rather than reliable RCE, and confidentiality is rated N. The AV:N 'remotely executed' framing is optimistic and vendor-typical (VulDB): these are encoder entry points, so exploitation requires an application to pass attacker-influenced image dimensions/components into stbi_write_* - reachability is application-dependent, not a direct network listener. Net: a real but lower-priority hardening issue rather than an emergency; treat the AV:N as 'reachable via untrusted input in some apps,' not 'unauthenticated internet-facing service.' |
| Exploit ScenarioDerived | An application uses stb_image_write.h to re-encode user-supplied images (e.g., a thumbnail/conversion service) and passes attacker-controlled width, height, or component counts into stbi_write_png_to_mem/stbi_write_jpg_core/stbi_write_tga_core. Crafted dimensions overflow the size arithmetic, causing an undersized buffer allocation followed by an out-of-bounds heap write, corrupting memory or crashing the process. Public exploit/PoC material is referenced in the vendor's stb issue #1964. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 30, 2026
Integer overflow in the image-encoding routines of nothings/stb (stb_image_write.h, stb through version 1.16) allows remote attackers who can influence image dimensions or channel counts passed to stbi_write_png_to_mem, stbi_write_jpg_core, or stbi_write_tga_core to corrupt memory or crash the encoding process. Publicly available exploit code exists (no CISA KEV entry, so active exploitation is not confirmed), and the flaw requires an application that feeds attacker-controlled sizing into the encoder rather than simple network reachability. The published CVSS 4.0 score of 6.9 overstates practical risk: an independent assessment rates it CVSS:3.1/AV:N/AC:H/PR:N/UI:N with only low integrity and availability impact and no confidentiality impact - a genuine but modest-severity issue whose real exposure depends entirely on whether the host application passes untrusted dimensions to the write functions.
RemediationAI
No vendor-released patch identified at time of analysis: the provided references point only to the VulDB entries (https://vuldb.com/vuln/411497, https://vuldb.com/vuln/411497/cti) and the upstream tracking issue https://github.com/nothings/stb/issues/1964, which is a bug report and discussion thread rather than a tagged release, so there is no confirmed fixed version of stb to upgrade to. Until a fix ships, the practical mitigation is architectural and must be applied in the calling application: enforce strict upper bounds on width, height, and channel/component counts before invoking stbi_write_png_to_mem, stbi_write_jpg_core, or stbi_write_tga_core; reject or downscale images whose declared dimensions exceed what the application can legitimately produce; and validate that the computed pixel-buffer size does not exceed a sane cap (e.g., re-derive width*height*channels in 64-bit arithmetic and compare it to the 32-bit value the encoder will use). Where the encoder is only reachable through an upload/convert feature, restricting that endpoint to trusted users or disabling the re-encode path removes the attack surface entirely - with the trade-off of losing that functionality for legitimate users. Vendoring a locally patched copy of stb_image_write.h with checked multiplication is the most direct fix but creates long-term maintenance drift when upstream ships an official release, and capping dimensions can break legitimate large-image workflows, so limits should be set from observed production maxima rather than an arbitrary constant.
Affected VersionsENISA
Affected Packages
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_write.h is a single-header, public-domain C image encoder from the nothings/stb collection, widely vendored into applications, tools, and language bindings (the CPE cpe:2.3:a:nothings:stb:*:*:*:*:*:*:*:* covers all versions through 1.16). The root cause is CWE-190, integer overflow: when computing the byte size of the output pixel buffer, the encoder multiplies width, height, and component/channel counts using unchecked integer arithmetic. If those multiplication results wrap, the allocation or offset arithmetic yields a smaller-than-expected size, and the subsequent write loop can exceed the buffer boundary - the reason the record is also tagged as a buffer overflow alongside the integer overflow classification. The affected entry points are stbi_write_png_to_mem (in-memory PNG encoding), stbi_write_jpg_core (JPEG encoding), and stbi_write_tga_core (TGA encoding), so the vulnerable surface is the encode/write path, not the decode path. Reachability is therefore the limiting factor: an attacker must reach an application feature that uploads, converts, or re-encodes images (or otherwise supplies dimensions, row strides, or component counts) that the application then hands to these routines. No authentication is modeled in the submitted vector (PR:N) and no user interaction is required (UI:N), but the independently assessed vector raises attack complexity to High precisely because such a controllable encode call path is not universal.
Know when Stb 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
AV:N since untrusted input can arrive over a network, but AC:H because it requires an app that feeds attacker-controlled encode dimensions; impact limited to memory corruption/crash (I:L/A:L), no confidentiality loss.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
2DescriptionCVE.org
A flaw has been found in Nothings stb up to 1.16. This affects the function stbi_write_png_to_mem/stbi_write_jpg_core/stbi_write_tga_core in the library stb_image_write.h of the component Image Encoding. Executing a manipulation can lead to integer overflow. The attack can be executed remotely. The exploit has been published and may be used.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
Related Vulnerabilities in Nothings stb Integer Overflow in Image/Audio Headers
View all 2stb_image.h (aka the stb image loader) 2.23 has a heap-based buffer over-read in stbi__tga_load, leading to Information
STB v2.27 was discovered to contain an integer shift of invalid size in the component stbi__jpeg_decode_block_prog_ac. R
Buffer overflow vulnerability in function stbi__extend_receive in stb_image.h in stb 2.26 via a crafted JPEG file. Rated
Out-of-bounds write in Nothings stb library up to version 1.22 allows remote attackers to corrupt memory and potentially
Resource exhaustion in Nothings stb library versions up to 1.22 allows unauthenticated remote attackers to cause denial
Out-of-bounds read in Nothings stb library up to version 1.26 allows remote attackers to trigger information disclosure
Denial of service vulnerability in Nothings stb image library (stb_image.h) affecting GIF decoder function stbi__gif_loa
Double free vulnerability in Nothings stb library (up to version 2.30) in the multi-frame GIF file handler function stbi
EUVD-2026-89536
GHSA-cc6h-2fmv-w53q
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB