CVE-2026-59679

fs_read_glyphs() heap OOB read/write via encoding array index mismatch in libXfont2

Published Sep 10, 2026 CVSS 4.0 · 9.2 Critical EPSS < 1% KEV · Not listed
Description
fs_read_glyphs() in the libXfont2 font-server client (src/fc/fserve.c) indexes the per-character encoding[] array using num_chars from the FS_QueryXBitmaps16 reply, but that array was allocated with a size derived from num_extents in the separate FS_QueryXExtents16 reply. The two CARD32 fields are never cross-checked.
A malicious or compromised font server can send a small num_extents (e.g. 1) in the extents reply, then a large num_chars (e.g. 100000) in the bitmaps reply. This causes attacker-controlled out-of-bounds heap read and writes.

Analysis

AI-generated

Technical impact

The libXfont2 font-server client contains an out‑of‑bounds read/write flaw that is triggered when it processes font data received from an external font server. A remote attacker who can run a malicious font server can exploit this by sending crafted font data that causes the client to read or write memory beyond the allocated buffer. If the X server is running with elevated privileges, the corrupted memory can allow the attacker to elevate their own privileges on the host; if the X server runs as an unprivileged user, the overflow may simply crash the server resulting in a denial of service.

Affected Systems

The vulnerability affects the libXfont2 library used by X server implementations on Unix-like systems. No specific vendor product list or version numbers are listed, so all installations that employ the libXfont2 font‑server client and accept external fonts are potentially impacted.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity, and while no EPSS value is available, the lack of a KEV listing suggests that widespread exploitation has not yet been observed. The likely attack vector is remote: an attacker must be able to control or supply a malicious font server that the victim’s X server will contact. The flaw requires the victim’s X server to load the defective font; therefore, systems that disable external font loading or run the X server with restricted permissions face a lower exploitation risk.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade libXfont2 to the latest version that contains the fix for the out‑of‑bounds read/write bug.
  • Restrict the X server to use only trusted local fonts or disable external font server connections if possible, to prevent the client from receiving malicious font data.
  • Configure the X server to run under the least privilege necessary, reducing the impact of a privilege‑elevation exploit and limiting the service to a safe failure mode in case of denial of service.

Generated by OpenCVE AI on August 6, 2026 at 13:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description A flaw was found in the libXfont2 font-server client. A remote attacker, by operating a malicious font server, could exploit an out-of-bounds read/write vulnerability. This occurs because the client incorrectly handles font data, leading to an out-of-bounds memory access. This can lead to privilege escalation if the X server runs with root privileges, or a denial of service (crash) if it runs as an unprivileged user. fs_read_glyphs() in the libXfont2 font-server client (src/fc/fserve.c) indexes the per-character encoding[] array using num_chars from the FS_QueryXBitmaps16 reply, but that array was allocated with a size derived from num_extents in the separate FS_QueryXExtents16 reply. The two CARD32 fields are never cross-checked. A malicious or compromised font server can send a small num_extents (e.g. 1) in the extents reply, then a large num_chars (e.g. 100000) in the bitmaps reply. This causes attacker-controlled out-of-bounds heap read and writes.
Title libxfont2: Font Server Client encoding[] Out-Of-Bounds Read/Write fs_read_glyphs() heap OOB read/write via encoding array index mismatch in libXfont2
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.2, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

cvssV3_1

{'score': 9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H'}

Type Values Removed Values Added
First Time appeared Libxfont2
Libxfont2 libxfont2
Vendors & Products Libxfont2
Libxfont2 libxfont2
Type Values Removed Values Added
Weaknesses CWE-119
CWE-787
Type Values Removed Values Added
Description A flaw was found in the libXfont2 font-server client. A remote attacker, by operating a malicious font server, could exploit an out-of-bounds read/write vulnerability. This occurs because the client incorrectly handles font data, leading to an out-of-bounds memory access. This can lead to privilege escalation if the X server runs with root privileges, or a denial of service (crash) if it runs as an unprivileged user.
Title libxfont2: Font Server Client encoding[] Out-Of-Bounds Read/Write
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H'}

threat_severity

Important

Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-787

    Out-of-bounds Write

Sources

Status
PUBLISHED
Assigner
suse
Published
Updated
Sep 10, 2026, 12:45 PM
Reserved
Jul 6, 2026, 11:59 AM
Status
Awaiting Analysis
Published
Sep 10, 2026, 9:17 AM
Modified
Sep 10, 2026, 3:43 PM
Severity
Important
Public date
Aug 5, 2026, 10:00 AM