SSTI
Confirm SSTI
Break Template Syntax
${{<%[%'"}}%\.Basic Math Test
{{7*7}}
${7*7}
<%= 7*7 %>
${{7*7}}
#{7*7}
*{7*7}Identify Template Engine
Payload
Result
Engine
Formal Template Engine Identification (ordered payloads)
Payload
If Rendered
Engine
JavaScript (Node.js) Template Engines
Template Engine
Payload Format
Jinja2 (Python/Flask)
Information Disclosure
Local File Read
RCE
Alternative Paths to RCE
Twig (PHP/Symfony)
Information Disclosure
Local File Read (Symfony only)
RCE
Nunjucks (Node.js/Express)
Confirm SSTI
RCE via range.constructor
Environment Leak
Universal Node.js SSTI Payloads
Rendered RCE
Error-Based RCE
Boolean-Based RCE
Time-Based RCE
SSTImap (Automated Tool)
Python eval() in f-string / format string
Other Engines Quick Reference
ERB (Ruby)
RCE
File Read
Introspection
Reverse Shell via ERB
Bypassing Input Validation with Newline Injection
Vulnerable Code Pattern (Sinatra + ERB.new)
Freemarker (Java)
Pebble (Java)
Resources
Last updated