CVE-2025-15533

5.3 MEDIUM

📋 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

Products:
  • raysan5 raylib
Versions: All versions up to commit 909f040
Operating Systems: All platforms where raylib runs (Windows, Linux, macOS, etc.)
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using the GenImageFontAtlas function with untrusted font data.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: LOW - Attack requires local access to execute.
🏢 Internal Only: MEDIUM - Local users could exploit this to escalate privileges or disrupt services.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

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

all

Avoid using GenImageFontAtlas function with untrusted input

Sandbox application

all

Run 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

📤 Share & Export