CVE-2026-5186
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 · uneditedA weakness has been identified in Nothings stb up to 2.30. This impacts the function stbi__load_gif_main of the file stb_image.h of the component Multi-frame GIF File Handler. This manipulation causes double free. The attack requires local access. The exploit has been made available to the public and could be used for attacks. 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 confidenceA double-free vulnerability exists in stb_image.h's stbi__load_gif_main function when processing multi-frame GIF files. The vulnerability allows a local attacker to trigger a double-free condition by supplying a specially crafted GIF file, potentially leading to heap corruption, denial of service, or potentially code execution depending on memory state.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
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
- Local
- Complexity
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
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 checksWork through these to decide whether this CVE applies to you.
-
Locate stb_image.h in your environmentSearch for stb_image.h files in your project directories, dependencies, or installed libraries using 'find . -name stb_image.h' or check your package manager for stb librariesAffected if stb_image.h is present and used in the environment
-
Identify the stb_image versionOpen stb_image.h and look for a version definition near the top of the file (typically a comment like 'version 2.xx' or a #define STB_VERSION)Affected if The version is 2.30 or earlier, or no version string is visible (indicating an older release)
-
Determine if GIF processing is usedSearch your codebase for calls to stbi_load, stbi_load_gif, stbi_image_load, or similar stb_image functions that handle GIF filesAffected if Your application code loads or processes GIF image files using stb_image functions
-
Verify multi-frame GIF input is possibleCheck if your application accepts GIF files from untrusted sources (user uploads, network input, file processing of arbitrary GIFs)Affected if Your application accepts and processes GIF files from external or untrusted sources without prior validation
-
Confirm the vulnerable code path existsIn stb_image.h, locate the stbi__load_gif_main function (search for 'stbi__load_gif_main') to confirm the function is present in your versionAffected if The stbi__load_gif_main function exists in your copy of stb_image.h (this function handles multi-frame GIF decoding)
-
Review memory allocation patternsIf possible, run your application with a memory debugging tool (ASan, Valgrind) while processing a multi-frame GIF to observe any double-free behaviorAffected if Memory debugging tools report a double-free or heap corruption condition when processing multi-frame GIF files
Your environment is affected if stb_image.h version 2.30 or earlier is in use AND your application processes multi-frame GIF files from any untrusted source, as the stbi__load_gif_main function contains the double-free vulnerability.
Generated from the published advisory. Verify against your own configuration.
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 dataUpdate stb library to a version beyond 2.30 if available; otherwise validate all GIF input before processing or replace with an alternative image library that has active security maintenance.
- Consultation4.0 h
- Implementation8.0 h
- Testing8.0 h
- Review / QA4.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $6,656.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-5186 — 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-5186 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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