Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Local attack, low privileges, limited impact
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionCVE.org
A vulnerability was detected in floooh sokol up to 16cbcc864012898793cd2bc57f802499a264ea40. The impacted element is the function _sg_pipeline_desc_defaults in the library sokol_gfx.h. The manipulation results in stack-based buffer overflow. The attack requires a local approach. The exploit is now public and may be used. This product does not use versioning. This is why information about affected and unaffected releases are unavailable. The patch is identified as 5d11344150973f15e16d3ec4ee7550a73fb995e0. It is advisable to implement a patch to correct this issue.
AnalysisAI
Stack-based buffer overflow in the sokol graphics library's pipeline descriptor defaults function allows a local attacker with low privileges to trigger memory corruption. The vulnerability affects all versions up to commit 16cbcc864012898793cd2bc57f802499a264ea40, and a public exploit is available, though active exploitation has not been confirmed by CISA KEV.
Technical ContextAI
The vulnerability resides in _sg_pipeline_desc_defaults within sokol_gfx.h, a component of sokol, a single-header cross-platform graphics library. The function copies default pipeline state and uses SOKOL_ASSERT to validate buffer_index against SG_MAX_VERTEXBUFFER_BINDSLOTS but lacks a lower-bound check, allowing a negative index to pass and cause a stack buffer overflow (CWE-119). The attack is local (AV:L) and requires low privileges (PR:L).
RemediationAI
Apply the patch commit 5d11344150973f15e16d3ec4ee7550a73fb995e0 by updating the sokol library to the latest commit from the repository (https://github.com/floooh/sokol). The patch adds a lower-bound assertion to buffer_index, causing an abort if the index is negative. There is no workaround other than avoiding exposure to untrusted shader pipeline descriptors; applications that only use hardcoded or trusted shaders are not affected.
Same weakness CWE-119 – Buffer Overflow
View allSame technique Buffer Overflow
View allShare
External POC / Exploit Code
Leaving vuln.today