CVE-2026-135295 in FontForge
Summary
by MITRE • 11/23/2026
FontForge through 20251009 contains a heap out-of-bounds write vulnerability in PcfReadEncodingsNames() that allows attackers to corrupt memory via negative glyph indices from truncated PCF encodings tables. Attackers can supply a crafted .pcf file imported through the GUI or scripting Import() command to write before the encs array, causing crashes or potential code execution.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 11/23/2026
FontForge versions up to 20251009 are affected by a critical heap-based buffer overflow vulnerability located within the PcfReadEncodingsNames function. This flaw arises from insufficient validation of glyph indices when processing PCF (Portable Compiled Format) font files, specifically those containing truncated or malformed encodings tables. The root cause is a failure to properly check array bounds before accessing memory locations based on user-supplied input values derived from the file structure. When an attacker provides a crafted .pcf file with negative glyph indices embedded in the encoding data, the application interprets these invalid values as valid offsets and proceeds to write data at memory addresses preceding the intended encs array buffer. This out-of-bounds write operation corrupts adjacent heap metadata or other critical data structures stored immediately before the target buffer in memory allocation layouts.
The operational impact of this vulnerability is severe due to its potential for arbitrary code execution. By carefully crafting the payload within the malformed PCF file, an attacker can overwrite function pointers, exception handling records, or control flow integrity checks located near the corrupted heap chunk. This manipulation allows for precise control over program execution flow during subsequent operations such as font rendering, editing, or export processes initiated through either the graphical user interface or scripting interfaces via the Import command. The vulnerability facilitates remote code execution if a victim opens a maliciously constructed file within FontForge, potentially leading to full system compromise depending on the privileges under which the application is running and the presence of additional exploitation mitigations like ASLR or DEP in the operating environment.
From a classification perspective, this issue aligns with CWE-120 Buffer Copy without Checking Size of Input Classic buffer overflow and specifically manifests as CWE-787 Out-of-bounds Write when considering the memory corruption aspect. In terms of attack vectors, it corresponds to ATT&CK technique T1203 Exploitation for Client Execution where attackers leverage vulnerable applications on end-user systems. The vulnerability highlights risks associated with parsing complex binary formats without rigorous input validation and bounds checking mechanisms in place within font rendering engines commonly used by designers and developers.
Mitigation strategies should prioritize immediate patching to the latest stable release of FontForge which addresses this specific heap corruption issue through enhanced boundary checks for glyph index values during PCF table parsing. Organizations relying on FontForge for automated typography processing or design workflows must implement strict input sanitization policies if integrating with external file sources that cannot be fully trusted. Additionally, deploying application whitelisting and restricting execution privileges to standard user accounts can limit the impact of successful exploitation attempts by preventing escalation to administrative rights. Security teams should also monitor for unusual memory access patterns in logging systems as indicators of potential exploitation activity targeting font processing components within their infrastructure.