Executive brief
stb is a widely-used single-header C library for font rendering and other media processing. An out-of-bounds memory read in its TrueType font parser allows an attacker to trigger a denial-of-service crash by providing a crafted font file with malformed glyph contours. Applications that load untrusted fonts without sandboxing could experience unexpected crashes or potential information leakage.
Technical details
The vulnerability is an out-of-bounds read (heap buffer over-read) in the stbtt__GetGlyphShapeTT function at stb_truetype.h line 1780. The root cause occurs when a contour's final vertex is an off-curve point: the code attempts to read vertices[off+n].type, which accesses one byte past the allocated n-element vertex array. The vulnerable code path is triggered via stbtt_GetGlyphShape when parsing a TrueType glyph containing a single contour with only an off-curve point. No authentication is required; an attacker simply provides a crafted TTF file. The impact is a crash due to memory access violation, resulting in denial of service. A patch has been identified in the upstream GitHub repository (nothings/stb issue #1962).
Affected products
- nothings stb commit 31c1ad3 and prior
Timeline
- 2026-06-06: disclosed: Issue reported on GitHub
- 2026-09-09: advisory: CVE-2026-79515 published on NVD