Security Vulnerability Report
中文
CVE-2026-34085 CVSS 5.9 MEDIUM

CVE-2026-34085

Published: 2026-03-25 17:17:09
Last Modified: 2026-05-12 15:37:22

Description

fontconfig before 2.17.1 has an off-by-one error in allocation during sfnt capability handling, leading to a one-byte out-of-bounds write, and potentially a crash or code execution. This is in FcFontCapabilities in fcfreetype.c.

CVSS Details

CVSS Score
5.9
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Configurations (Affected Products)

cpe:2.3:a:fontconfig_project:fontconfig:2.17.0:*:*:*:*:*:*:* - VULNERABLE
fontconfig < 2.17.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * Conceptual PoC for CVE-2026-34085 * Triggering off-by-one in FcFontCapabilities */ #include <stdio.h> #include <fontconfig/fontconfig.h> int main() { if (!FcInit()) return 1; // Path to a crafted font file const char* font_path = "./crafted_font.ttf"; FcPattern* pat = FcPatternCreate(); FcPatternAddString(pat, FC_FILE, (const FcChar8*)font_path); FcObjectSet* os = FcObjectSetBuild(FC_CAPABILITY, NULL); // Trigger parsing in FcFontCapabilities FcFontSet* fs = FcFontList(0, pat, os); if (fs) FcFontSetDestroy(fs); FcObjectSetDestroy(os); FcPatternDestroy(pat); FcFini(); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34085", "sourceIdentifier": "[email protected]", "published": "2026-03-25T17:17:09.210", "lastModified": "2026-05-12T15:37:22.133", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "fontconfig before 2.17.1 has an off-by-one error in allocation during sfnt capability handling, leading to a one-byte out-of-bounds write, and potentially a crash or code execution. This is in FcFontCapabilities in fcfreetype.c."}, {"lang": "es", "value": "fontconfig anterior a 2.17.1 tiene un error de uno en la asignación durante el manejo de capacidades sfnt, lo que lleva a una escritura fuera de límites de un byte, y potencialmente a un fallo o ejecución de código. Esto se encuentra en FcFontCapabilities en fcfreetype.c."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L", "baseScore": 5.9, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.5, "impactScore": 3.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-193"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:fontconfig_project:fontconfig:2.17.0:*:*:*:*:*:*:*", "matchCriteriaId": "9CBF4F07-51C6-46C4-AC6B-88717551EF7A"}]}]}], "references": [{"url": "https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/b9bec06d73340f1b5727302d13ac3df307b7febc", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/446", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://gitlab.freedesktop.org/fontconfig/fontconfig/-/work_items/481", "source": "[email protected]", "tags": ["Issue Tracking"]}]}}