sokol Graphics Library CVE-2025-15013
LOWAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessLocal user gains system access
-
DeliveryEmbeds crafted pipeline descriptor
-
ExploitCalls sokol graphics init
-
ExecutionTriggers _sg_validate_pipeline_desc
-
PersistStack buffer overflow occurs
-
ImpactStack memory corruption with limited scope
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, buffer size validation
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires local system access as an authenticated user (PR:L). The attacker must be able to call sokol graphics functions directly, typically through an application embedding the sokol library. No special sokol configuration is required - the vulnerable validation function is present in default builds. Exploitation is limited to processes using sokol_gfx.h; network-based remote exploitation is impossible (AV:L). The low impact ratings indicate overflow scope is heavily constrained, preventing full memory corruption or privilege escalation despite the buffer overflow primitive. |
| Impact | Despite the stack-based buffer overflow classification suggesting potential for elevated impact, multiple factors dramatically reduce real-world risk. The CVSS 4.0 vector AV:L/AC:L/PR:L indicates local access and low privilege authentication requirement, immediately limiting scope to local authenticated users. The CVSS impact ratings (VC:L/VI:L/VA:L) cap each impact category at 'Low', contradicting typical buffer overflow severity expectations. EPSS exploitation probability is critically low at 0.03% (7th percentile), suggesting either very specific exploitation conditions or minimal exploitability despite POC availability. No CISA KEV confirmation of active exploitation in the wild. The combination of local-only attack vector, low privilege requirement, and low impact scope indicates this is a low-priority vulnerability for most deployments despite public exploit code existence. This represents a case where raw CVSS score (1.9) accurately reflects actual risk rather than understating it. Developers integrating sokol should patch during regular maintenance windows rather than treating this as urgent. |
| Exploit ScenarioDerived | A local authenticated user crafts a malicious graphics pipeline descriptor with oversized buffer fields and passes it to sokol's pipeline initialization function. The _sg_validate_pipeline_desc function fails to bounds-check the descriptor structure, writing attacker-controlled data onto the stack. While the low impact rating limits potential for code execution, the attacker could potentially corrupt local variables or function return pointers if the overflow reaches sensitive stack locations. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 29, 2026
Stack-based buffer overflow in sokol_gfx.h function _sg_validate_pipeline_desc allows local authenticated attackers to corrupt stack memory with limited confidentiality and integrity impact. The vulnerability affects sokol up to commit 5d11344150973f15e16d3ec4ee7550a73fb995e0, with patch commit b95c5245ba357967220c9a860c7578a7487937b0 available. Publicly available exploit code exists, though EPSS exploitation probability remains very low at 0.03%, indicating limited real-world attack surface.
RemediationAI
Update sokol to commit b95c5245ba357967220c9a860c7578a7487937b0 or later via git pull and rebuild. Because sokol is header-only, the patch requires only replacing the sokol_gfx.h header file and recompiling dependent applications. Verify the applied commit hash using 'git log --oneline' and confirm b95c5245 is present. For developers unable to immediately update, restrict pipeline descriptor creation to trusted code paths and validate descriptor structures before passing to _sg_validate_pipeline_desc if custom descriptor construction occurs. The patch itself addresses buffer bounds validation, so no behavioral workarounds are available. Reference: https://github.com/floooh/sokol/pull/246 and https://github.com/seyhajin/sokol/commit/b95c5245ba357967220c9a860c7578a7487937b0
Affected ProductsAI
Sokol graphics library versions up to commit 5d11344150973f15e16d3ec4ee7550a73fb995e0 are affected. Because sokol uses a rolling release model without traditional version numbers, affected releases cannot be enumerated by version string. The library is distributed as a header-only C library via GitHub (github.com/floooh/sokol). Users should identify their local commit hash and determine if it is earlier than the patching commit b95c5245ba357967220c9a860c7578a7487937b0.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Sokol is a header-only C graphics library providing cross-platform abstraction for graphics APIs. The vulnerable function _sg_validate_pipeline_desc in sokol_gfx.h performs validation of graphics pipeline descriptors without proper bounds checking on stack buffers. The CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer) classification indicates the core issue is insufficient validation of buffer boundaries during pipeline descriptor processing. This validation function is called during graphics pipeline initialization, which occurs early in graphics setup workflows. The library uses a rolling release model via GitHub commits rather than traditional versioned releases, making patch tracking dependent on Git commit hashes.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
Primary rating from Vendor (vuldb) · only source for this CVE.
CVSS VectorVendor: vuldb
DescriptionCVE.org
A vulnerability was identified in floooh sokol up to 5d11344150973f15e16d3ec4ee7550a73fb995e0. The impacted element is the function _sg_validate_pipeline_desc in the library sokol_gfx.h. Such manipulation leads to stack-based buffer overflow. The attack must be carried out locally. The exploit is publicly available and might be used. This product utilizes a rolling release system for continuous delivery, and as such, version information for affected or updated releases is not disclosed. The name of the patch is b95c5245ba357967220c9a860c7578a7487937b0. It is best practice to apply a patch to resolve this issue.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB