Stb Image.hApplication · Nothings

CVE-2025-3409

HIGH · 8.8 CVSS v3.1 Published 2025-04-08
Fix available
A fix is available. Upgrade to after 2.13 or later.
See remediation →
95/100
Remediation priority · Urgent
Remotely reachable No privileges

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
A vulnerability classified as critical has been found in Nothings stb up to f056911. This affects the function stb_include_string. The manipulation of the argument path_to_includes leads to stack-based buffer overflow. It is possible to initiate the attack remotely. This product does not use versioning. This is why information about affected and unaffected releases are unavailable. The vendor was contacted early about this disclosure but did not respond in any way.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · moderate confidence

A stack-based buffer overflow vulnerability exists in the stb_include_string function of the stb library (up to commit f056911). The path_to_includes argument is not properly bounds-checked before being copied to a stack-allocated buffer, allowing potential memory corruption when processing maliciously crafted paths.

MitigationFix requires adding proper bounds validation in stb_include_string before copying path_to_includes to the stack buffer. Applications using this library should validate and sanitize any user-controlled input passed to stb_include_string until the library patch is available.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Stb Image.hApplication
Affected:<= 2.13

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Locate stb_image.h in your environment
    Search your codebase or system for the file stb_image.h using file system searches (e.g., 'find . -name stb_image.h' or IDE search)
    Affected if The file stb_image.h is present in your environment and you are using this library in your project
  2. Identify the stb_image.h version
    Open stb_image.h and look for a version definition near the top of the file. Common version macros include STB_IMAGE_VERSION, STB_IMAGE_VERSION_NUM, or a comment indicating the version number
    Affected if The version is 2.13 or earlier (the vulnerability affects versions up to and including 2.13)
  3. Check if stb_include_string function is used
    Search your codebase for any calls to stb_include_string function. This function processes include paths and is the vulnerable entry point
    Affected if Your code directly calls stb_include_string and passes a path_to_includes argument
  4. Identify path_to_includes usage
    If stb_include_string is called, inspect the code path that leads to it. Determine whether the path_to_includes argument originates from user input, external configuration, or untrusted sources
    Affected if The path_to_includes argument can be controlled by an attacker and exceeds the internal buffer size (typically 512 bytes in stb implementations)
  5. Check for recent library updates
    If using a package manager or dependency manager, verify whether stb_image.h has been updated to a version beyond 2.13 or beyond commit f056911
    Affected if The library version remains at 2.13 or earlier, or the specific commit f056911 or earlier is in use

Your environment is affected if you use stb_image.h version 2.13 or earlier and your code invokes stb_include_string with a path_to_includes argument that can be arbitrarily long.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Upgrade available Upgrade to a release after 2.13
Interim mitigation

Fix requires adding proper bounds validation in stb_include_string before copying path_to_includes to the stack buffer. Applications using this library should validate and sanitize any user-controlled input passed to stb_include_string until the library patch is available.

Fix this in Stb Image.h Scoped from the published advisory
  • Consultation2.0 h
  • Implementation3.0 h
  • Testing3.0 h
  • Review / QA1.0 h
9.0 hours of engineering $1,570
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,512.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-3409 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-3409 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data