CVE-2025-15533
📋 TL;DR
A heap-based buffer overflow vulnerability exists in raylib's GenImageFontAtlas function. This allows local attackers to execute arbitrary code or cause denial of service by manipulating font atlas generation. Users of raylib applications are affected if they process untrusted font data.
💻 Affected Systems
- raysan5 raylib
📦 What is this software?
Raylib by Raylib
⚠️ Risk & Real-World Impact
Worst Case
Local privilege escalation leading to full system compromise via arbitrary code execution.
Likely Case
Application crash (denial of service) or limited code execution within the application's context.
If Mitigated
Application crash with no privilege escalation if sandboxed or running with minimal permissions.
🎯 Exploit Status
Exploit requires local access and manipulation of font data. Public proof-of-concept exists in GitHub repository.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Commit 5a3391fdce046bc5473e52afbd835dd2dc127146
Vendor Advisory: https://github.com/raysan5/raylib/issues/5433
Restart Required: Yes
Instructions:
1. Update raylib to version including commit 5a3391fdce046bc5473e52afbd835dd2dc127146. 2. Recompile applications with patched library. 3. Restart affected applications.
🔧 Temporary Workarounds
Disable font atlas generation
allAvoid using GenImageFontAtlas function with untrusted input
Sandbox application
allRun raylib applications with minimal privileges to limit exploit impact
🧯 If You Can't Patch
- Restrict local access to systems running vulnerable raylib applications
- Implement strict input validation for font data before passing to GenImageFontAtlas
🔍 How to Verify
Check if Vulnerable:
Check raylib version/git commit hash. If before commit 5a3391fdce046bc5473e52afbd835dd2dc127146, it's vulnerable.
Check Version:
git log --oneline | head -20 (for source builds) or check library version
Verify Fix Applied:
Verify raylib includes commit 5a3391fdce046bc5473e52afbd835dd2dc127146 in its history.
📡 Detection & Monitoring
Log Indicators:
- Application crashes with segmentation faults
- Unexpected memory access errors in raylib applications
Network Indicators:
- None - local exploitation only
SIEM Query:
Process:raylib AND (EventID:1000 OR ExceptionCode:c0000005)
🔗 References
- https://github.com/oneafter/1224/blob/main/hbf2
- https://github.com/raysan5/raylib/
- https://github.com/raysan5/raylib/commit/5a3391fdce046bc5473e52afbd835dd2dc127146
- https://github.com/raysan5/raylib/issues/5433
- https://github.com/raysan5/raylib/pull/5450
- https://vuldb.com/?ctiid.341705
- https://vuldb.com/?id.341705
- https://vuldb.com/?submit.733341
- https://vuldb.com/?submit.733342