Skip to main content

stb_image_write EUVDEUVD-2026-89536

| CVE-2026-102805 MEDIUM
Integer Overflow or Wraparound (CWE-190)
2026-09-30 VulDB GHSA-cc6h-2fmv-w53q
5.5
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit image with malicious dimensions
  2. Delivery
    Reach stbi_write_* encoder with untrusted size params
  3. Exploit
    Trigger CWE-190 overflow in size math
  4. Execution
    Undersized heap allocation
  5. Impact
    Out-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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – 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

stb 1.12
stb 1.14
stb 1.7
stb 1.3
stb 1.4
stb 1.16
stb 1.11
stb 1.8
stb 1.5
stb 1.2
stb 1.6
stb 1.1
stb 1.0
stb 1.10
stb 1.9
stb 1.15
stb 1.13

Affected Packages

euvd stb 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_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

Vendor (VulDB) PRIMARY 5.5 MEDIUM
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
vuln.today AI 4.8 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

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

Lifecycle Timeline

2
CVSS changed
Sep 30, 2026 - 01:22 NVD
6.9 (MEDIUM) 5.5 (MEDIUM)
CVE Published
Sep 30, 2026 - 00:15 cve.org
MEDIUM 6.9

DescriptionCVE.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

EPSS Score
0.3%
Top 74% exploitable
Prevalence
High
stb is an extremely widely embedded single-file C image library
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub 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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
High
Technical Impact
Partial

Priority Score

48
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
PoC: +20
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.

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 2

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