Adhyan Agarwal logoadhyan agarwal
BACK TO ARCHIVE
HTB|2026.02.07

Pterodactyl — Panel RCE to udisks/PAM XFS Root

OS

Linux

Difficulty

Medium

Category

LINUX

Released

2026.02.07

Exploited CVE-2025-49132 in Pterodactyl Panel to leak config and drop a pearcmd PHP webshell as wwwrun. Forged an admin via artisan tinker, cracked a bcrypt hash to SSH as phileasfogg3, then abused the udisks/PAM XFS loopback flaw for a SUID-root bash.

Want to try this box yourself?

Spoiler-free mode is on by default — every solution stays hidden behind a reveal. Peek the hints, attempt each step, then unlock the answer when you're stuck. Turn it off to read every solution inline.

Nmap

Web Enumeration

Looking at the website, it seems like a Minecraft server web page.

Minecraft server homepage on pterodactyl.htb

The changelog link is interesting.

Changelog page leaking version information

It is a changelog, and it leaks some version information.

Subdirectory fuzzing

Subdomain Fuzzing

Panel.pterodactyl.htb

Pterodactyl panel login page

It is a login page.

The changelog showed that it is a Pterodactyl panel, version 1.11.10.

Searching online for any public exploits, we find CVE-2025-49132, which is an unauthenticated RCE.

Searching online for a PoC, we find one on GitHub for this vulnerability.

Initial Foothold

We clone the repo:

We test to see if the target is vulnerable:

The repo has an exploit for dumping credentials:

The output has some credentials.

Credentials revealed in the dump-creds output

The credentials do not allow access to the panel.

We then edit the payload:

This sets a PHP webshell on the server.

We have code execution.

We can then use this to get a reverse shell:

We get a shell as wwwrun.

Privilege Escalation

We look at the crontabs running and find one that runs the program /var/www/pterodactyl/artisan.

We ask Claude to explain what Artisan is:

Laravel Artisan & Tinker Explanation

What is Artisan?

  • Laravel's command-line interface (CLI) tool
  • Located at /var/www/pterodactyl/artisan (or similar Laravel apps)
  • Provides commands for managing the application

What is Tinker?

  • Interactive PHP REPL (Read-Eval-Print Loop) accessed via php artisan tinker
  • Lets you execute PHP code directly in the application's context
  • Has full access to Laravel's ORM (Eloquent), helpers, and the app's models
  • Essentially a PHP shell with the entire Laravel app loaded

Doing this creates a new user on the server.

We are then able to log in to the admin panel at http://panel.pterodactyl.htb.

This did not result in anything.

Shell as phileasfogg3

In the database, we get 2 hashes:

headmonitor:$2y$10$InPW8ZXrJjj.RsGrDYD7K.EtH0a1K..tVbygi30Oc.RtwAk3Ehl8K phileasfogg3:$2y$10$PwO0TBZA8hLB6nuSsxRqoOuXuGi3I4AVVN2IgE7mZJLzky1vGC9Pi

Attempting to crack the hashes, we get credentials:

phileasfogg3:!QAZ2wsx

We SSH into the account and get a shell:

Looking at the mail, we see phil has an email:

Shell as root

https://cdn2.qualys.com/2025/06/17/suse15-pam-udisks-lpe.txt

Own Machine

On our own attacker machine, as root, we create an XFS image that contains a SUID-root shell, and copy it to the victim machine:

Victim machine