CVE-2026-5186: 
Linux Debian vulnerability analysis and mitigation

Overview

CVE-2026-5186 is a double free vulnerability in the stbi__load_gif_main function within stb_image.h of the nothings/stb library, affecting all versions up to and including 2.30. The flaw resides in the Multi-frame GIF File Handler component and can be triggered by a locally accessible attacker with low privileges. It was published on March 31, 2026, with the vendor reportedly unresponsive to early disclosure attempts. The vulnerability carries a CVSS v3.1 base score of 5.3 (Medium) and a CVSS v4.0 base score of 4.8 (Medium) (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is classified under CWE-415 (Double Free) and CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer), with an additional classification of CWE-1341 (Multiple Releases of Same Resource or Handle). The vulnerability occurs when the stbi__load_gif_main function in stb_image.h improperly manages memory during the processing of multi-frame GIF files, resulting in the same memory region being freed more than once. Exploitation requires local access and low privileges, with no user interaction needed. A proof-of-concept exploit has been made publicly available via VulDB (GitHub Advisory, Red Hat Bugzilla).

Impact

Successful exploitation of this double free vulnerability can result in low-level impacts to confidentiality, integrity, and availability of the affected system. An attacker with local, low-privilege access could corrupt heap memory, potentially leading to information disclosure, denial of service (application crash), or in more advanced scenarios, arbitrary code execution depending on the memory allocator and runtime environment. Because stb_image.h is a widely embedded single-header library used across many applications and game engines, the scope of affected systems may be broad (GitHub Advisory, Red Hat Bugzilla).

Exploitability

A proof-of-concept exploit has been publicly disclosed via VulDB (submission #780395), increasing the practical risk of exploitation. The EPSS score is approximately 0.012% (0.018% per GitHub Advisory), indicating a currently low probability of active exploitation within the next 30 days. There is no evidence of in-the-wild exploitation or threat actor attribution at this time, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The CVSS v4.0 exploit maturity is rated as "Proof of Concept" (GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Identify applications or systems that embed the nothings/stb library (stb_image.h) version 2.30 or earlier, particularly those that process multi-frame GIF files locally.
  2. Prepare malicious GIF: Craft a specially formed multi-frame GIF file designed to trigger the double free condition in the stbi__load_gif_main function during frame parsing.
  3. Deliver the payload: Place or supply the malicious GIF file to a location accessible by the target application (e.g., a local directory, shared storage, or an input path monitored by the vulnerable application).
  4. Trigger processing: Cause the vulnerable application to load and process the malicious GIF file, invoking stbi__load_gif_main in stb_image.h.
  5. Exploit double free: The function frees the same memory buffer twice during GIF frame handling, corrupting heap metadata. Depending on the allocator and application context, this may result in a crash (DoS), information leak, or potential code execution (GitHub Advisory).

Indicators of compromise

  • File System: Presence of unexpected or malformed multi-frame GIF files in directories processed by applications using stb_image.h; unusual files with .gif extensions in temporary or upload directories.
  • Logs: Application crash logs or core dumps referencing stbi__load_gif_main or heap corruption errors; segmentation fault signals (SIGSEGV) or double free error messages (e.g., free(): double free detected) in application or system logs.
  • Process: Unexpected termination or crash of applications that process GIF images; abnormal memory usage patterns or heap corruption reports from memory sanitizers (e.g., AddressSanitizer output referencing stb_image.h).

Mitigation and workarounds

Organizations should update the nothings/stb library to a version beyond 2.30 once a patched release is available; a patch has been indicated in GitHub advisory records, though specific patched version numbers are not yet confirmed. In the interim, restrict local access to systems and applications that process GIF files using stb_image.h, and audit all codebases and dependencies that embed this single-header library. Consider disabling multi-frame GIF processing in affected applications if not required, and monitor for suspicious file processing activity. Since the vendor did not respond to disclosure, rely on community-provided patches and upstream repository commits (GitHub Advisory, Red Hat Bugzilla).

Community reactions

Red Hat's Product Security team tracked this vulnerability via Bugzilla (Bug 2453296), classifying it as medium severity with a focus on denial of service and information disclosure impacts. The GitHub Advisory Database published the advisory on March 31, 2026, noting it as "Unreviewed" with no specific patched version confirmed. The vendor (nothings) did not respond to early disclosure attempts, which has been noted as a concern in advisory documentation. No significant broader media coverage or notable researcher commentary beyond standard advisory tracking has been identified at this time (GitHub Advisory, Red Hat Bugzilla).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Affected

bookworm

libstb

Affected

sid

libstb

Affected

trixie

libstb

Affected

Ubuntu

Unknown

devel

libstb

Unknown

focal (esm-apps)

libstb

Unknown

jammy

libstb

Unknown

jammy (esm-apps)

libstb

Unknown

noble

libstb

Unknown

noble (esm-apps)

libstb

Unknown

resolute

libstb

Unknown

resolute (esm-apps)

libstb

Unknown

Source: This report was generated using AI

Related Linux Debian vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-116612HIGH7.8
  • Linux Debian logoLinux Debian
  • gstreamer-editing-services1.0
NoYesOct 26, 2026
CVE-2026-115909HIGH7.5
  • Linux Debian logoLinux Debian
  • rust-zip
NoNoOct 26, 2026
CVE-2026-115907HIGH7.5
  • Linux Debian logoLinux Debian
  • rust-zip
NoNoOct 26, 2026
CVE-2026-115910MEDIUM6.8
  • Python logoPython
  • social-auth-core
NoYesOct 26, 2026
CVE-2026-2270MEDIUM5.9
  • NixOS logoNixOS
  • kubernetes
NoYesOct 26, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management