Lab: Server-side template injection in an unknown language with a documented exploit
Summary: PortSwigger's lab presents a target vulnerable to server-side template injection, and solving it requires identifying the template engine and finding a documented exploit online to execute arbitrary code. The final step modifies that exploit to call require("child_process").exec("rm /home/carlos/morale.txt"), URL-encoded as the message parameter, to delete the morale.txt file from Carlos's home directory.
Why it matters: The path from a template injection to running arbitrary commands is a documented, publicly available exploit - the same chain an attacker would use against any application that passes user input into a template engine without sandboxing.
Read the original at PortSwigger Research ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026