A reflected 49 from {{7*7}} only tells you some engine evaluated your input. Send a second probe, {{7*'7'}}, in the same parameter. Jinja2 repeats the string and returns 7777777; Twig converts it to a number and returns 49. If neither works, try ${7*7} (Freemarker, Velocity, Thy…
Server-side template injection (SSTI): how to hunt it
Where to look
- Fields shown back in emails, PDFs, notifications and previews rendered from templates.
- Probes such as {{7*7}}, ${7*7} and <%= 7*7 %> that come back as 49 in the server’s response, not from a client-side framework.
- Error messages that name the template engine, which decide the next payload.
- Templates customers can edit in admin or theme settings.
What proves it
Show the engine evaluating an expression you supplied and, where the program allows it, a harmless command; name the engine and where the input was placed.
Read further
Writeups on Server-side template injection (SSTI), by hunters and researchers, most with a short summary.
Related classes