Cyber Risks · PortSwigger Research

Lab: Server-side template injection in a sandboxed environment

Summary: This PortSwigger lab uses the Freemarker template engine, which is vulnerable to server-side template injection because of its poorly implemented sandbox. Solving the lab requires breaking out of the sandbox to read the file my_password.txt from Carlos's home directory and submitting its contents.

What's compelling: A template engine sandbox is a control, and this lab shows it failing: once an attacker chains method invocations to reach a class with a static file-reading method, files like my_password.txt on the host are readable.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related