# CVE-2026-79516: stb out-of-bounds write in stbsp_vsnprintf

Source: https://junglewise.ai/threats/cve-2026-79516-stb-out-of-bounds-write-in-stbsp-vsnprintf  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-09. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-79516 · Severity: medium · CVSS 4 · Published 2026-09-09

stb is a popular single-file C library collection used in games, graphics tools, and other performance-critical applications. A buffer overflow vulnerability in its sprintf implementation allows attackers to write a null byte one position before a caller-provided buffer, corrupting adjacent memory and potentially causing application crashes or code execution.

Technologies: [Nothings Stb](https://junglewise.ai/threats/technologies/stb). Vendors: [Nothings](https://junglewise.ai/threats/vendors/nothings).

## Quick answers

**Is CVE-2026-79516 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-79516 being exploited in the wild.

**How severe is CVE-2026-79516?** Medium severity, with a CVSS score of 4, published 9 September 2026.

**Which products and versions are affected?** Nothings Stb commit 31c1ad3 and prior.

**Is there a fix for CVE-2026-79516?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-79516 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-79516?** Check whether you run Nothings Stb at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

An out-of-bounds write vulnerability exists in stbsp_vsnprintf() (stb_sprintf.h) when called with count=0 and a non-NULL buffer. The null-termination logic computes a negative offset (l = -1), writing buf[-1] = 0. The root cause is missing bounds validation: when count=0, the internal callback clamps output to 0 bytes, but the subsequent null-terminator write does not account for this edge case. Attack vector requires calling stbsp_snprintf() with adversarial count and buffer parameters; no network reachability or authentication is required. An attacker can corrupt heap or stack memory adjacent to the target buffer. A patch is pending; workarounds include validating count > 0 before calling stbsp_snprintf().

## Affected products

- nothings stb commit 31c1ad3 and prior

## Timeline

- 2026-06-06: disclosed: Issue reported on GitHub #1963
- 2026-09-09: advisory: CVE-2026-79516 published

## References

- [https://github.com/nothings/stb/issues/1963](https://github.com/nothings/stb/issues/1963)

## Related threats

- [stb image integer overflow in PNG/JPEG/TGA encoding](https://junglewise.ai/threats/cve-2026-102805-a-flaw-has-been-found-in-nothings-stb-up-to-1-16-this-affects)
- [nothings stb integer overflow in hexwave_init](https://junglewise.ai/threats/cve-2026-102804-a-vulnerability-was-detected-in-nothings-stb-up-to)
- [nothings stb out-of-bounds read in TrueType glyph parsing](https://junglewise.ai/threats/cve-2026-79515-nothings-stb-out-of-bounds-read-in-truetype-glyph-parsing)
