Pterodactyl
Executive summary — Pterodactyl chains three 2025 CVEs. A file-inclusion flaw in Pterodactyl Panel (CVE-2025-49132) leaks the configuration and, combined with PEAR, gives code execution as the web user. A readable
.envand a reused weak password lead to SSH. And two chained flaws in Linux's session and disk stack, CVE-2025-6018 (PAM/polkit) and CVE-2025-6019 (UDisks2), turn that unprivileged account into root.
| Platform | Hack The Box |
| Operating system | Linux |
| Difficulty | Medium |
| Status | Retired |
| Target IP | 10.129.85.31 |
Attack map
[80] pterodactyl.htb (MonitorLand) — vhost panel.pterodactyl.htb
│ Pterodactyl Panel 1.11.10 (Laravel 10 / PHP 8.4), changelog + phpinfo exposed
▼
[CVE-2025-49132] /locales/locale.json — require() with path traversal
│ config leak -> LFI -> pearcmd.php (LFI2RCE with PEAR)
▼
[RCE] wwwrun
│ readable .env -> MySQL -> phileasfogg3 bcrypt hash -> john
▼
[SSH] phileasfogg3 (user.txt)
│ CVE-2025-6018 — ~/.pam_environment: the SSH session becomes "active" for polkit
│ CVE-2025-6019 — UDisks2 Filesystem.Resize mounts XFS without nosuid
▼
[ROOT] SUID bash from the XFS image -> bash -p
1. Reconnaissance
nmap -p- --min-rate 3000 10.129.85.31 # 22, 80
nmap -sCV -p22,80 10.129.85.31
# 80 -> 302 Location: http://pterodactyl.htb/
echo "10.129.85.31 pterodactyl.htb panel.pterodactyl.htb play.pterodactyl.htb" | sudo tee -a /etc/hosts
| Port | Service | Detail |
|---|---|---|
| 22/tcp | SSH | OpenSSH 9.6 |
| 80/tcp | HTTP | nginx 1.21.5 (PHP-FPM 8.4 / Laravel) |
The landing page (MonitorLand, a Minecraft server) links to /changelog.txt, which reveals the whole stack:
[Installed] Pterodactyl Panel v1.11.10
- MariaDB 11.8.3 backend
[Enhanced] PHP Capabilities
- Enabled PHP-FPM ... Enabled PHP-PEAR ... Added temporary PHP debugging via phpinfo()
panel.pterodactyl.htbis Pterodactyl Panel v1.11.10 (Laravel 10 / PHP 8.4), found by vhost fuzzing.http://pterodactyl.htb/phpinfo.phpis exposed:short_open_tag=Off, emptydisable_functions,register_argc_argv=Onand aninclude_pathcontaining/usr/share/php/PEAR.
Why it matters. PEAR installed,
register_argc_argv=Onand a PHP inclusion point make up the classicpearcmd.phpLFI2RCE pattern.
Root Access unlocks the content you can't see — everything else on the site is already open.
See Root Access plansNo account? Create one free then upgrade from your console.