CVE-2025-15013
📋 TL;DR
A stack-based buffer overflow vulnerability exists in the _sg_validate_pipeline_desc function of floooh sokol's sokol_gfx.h library. This allows local attackers to potentially execute arbitrary code or crash applications using this library. The vulnerability affects all versions up to commit 5d11344150973f15e16d3ec4ee7550a73fb995e0.
💻 Affected Systems
- floooh sokol graphics library
⚠️ Manual Verification Required
This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.
Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).
🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.
- Review the CVE details at NVD
- Check vendor security advisories for your specific version
- Test if the vulnerability is exploitable in your environment
- Consider updating to the latest version as a precaution
⚠️ Risk & Real-World Impact
Worst Case
Local privilege escalation leading to full system compromise, arbitrary code execution, or persistent backdoor installation.
Likely Case
Application crash (denial of service) or limited code execution within the application's context.
If Mitigated
Minimal impact if proper sandboxing, privilege separation, and exploit mitigations (ASLR, stack canaries) are in place.
🎯 Exploit Status
Exploit requires local access to the system. Public proof-of-concept exists at the provided GitHub link.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Commit b95c5245ba357967220c9a860c7578a7487937b0
Vendor Advisory: https://github.com/floooh/sokol/issues/1404
Restart Required: Yes
Instructions:
1. Update sokol_gfx.h to commit b95c5245ba357967220c9a860c7578a7487937b0 or later
2. Recompile all applications using the sokol library
3. Restart affected applications
🔧 Temporary Workarounds
Disable vulnerable functionality
allIf possible, disable or restrict usage of the _sg_validate_pipeline_desc function in affected applications
🧯 If You Can't Patch
- Implement strict access controls to limit local user privileges
- Deploy exploit mitigation technologies (ASLR, DEP, stack canaries) and monitor for crash events
🔍 How to Verify
Check if Vulnerable:
Check if sokol_gfx.h commit hash is earlier than b95c5245ba357967220c9a860c7578a7487937b0
Check Version:
git log --oneline -1 sokol_gfx.h
Verify Fix Applied:
Verify sokol_gfx.h contains commit b95c5245ba357967220c9a860c7578a7487937b0 or later
📡 Detection & Monitoring
Log Indicators:
- Application crashes with stack corruption errors
- Unexpected termination of applications using sokol library
Network Indicators:
- None - local exploitation only
SIEM Query:
Process termination events for applications known to use sokol library with stack-related error codes
🔗 References
- https://github.com/floooh/sokol/issues/1404
- https://github.com/oneafter/1212/blob/main/stack1
- https://github.com/seyhajin/sokol/commit/b95c5245ba357967220c9a860c7578a7487937b0
- https://github.com/seyhajin/sokol/pull/246
- https://vuldb.com/?ctiid.337719
- https://vuldb.com/?id.337719
- https://vuldb.com/?submit.719820