hunt-ssti

Detects and exploits server-side template injection across Jinja2, Twig, Freemarker, ERB, and other engines.

1|Updated Aug 21, 2026
One-click install
npx skills add https://github.com/marcboggs/BMAD-AppSec-Orchestrator --skill hunt-ssti-marcboggs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hunt-ssti
Source: https://github.com/marcboggs/BMAD-AppSec-Orchestrator/tree/main/.claude/skills/hunt-ssti
Command: npx skills add https://github.com/marcboggs/BMAD-AppSec-Orchestrator --skill hunt-ssti-marcboggs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Server-side template injection is easy to miss during manual testing yet often leads directly to remote code execution. This Skill provides a structured methodology for fingerprinting template engines, confirming injection with math-expression probes, and escalating to RCE using engine-specific payloads. ## Core Features & Use Cases - Engine Fingerprinting: Detection payloads like {{77}}, ${77}, and <%= 77 %> distinguish Jinja2, Twig, Freemarker, ERB, Mako, Thymeleaf, and Velocity based on evaluated output. - RCE Escalation: Engine-specific exploitation patterns including Jinja2 class-walker payloads, Twig registerUndefinedFilterCallback, Freemarker Execute utility, and ERB backticks. - Attack Surface Guidance: Identifies high-value injection points such as email templates, PDF generators, CMS previews, invoice fields, and reflected URL parameters. - Use Case: While testing a bug bounty target, you notice a name field reflected in a confirmation email. Submit {{77}}, observe 49 in the rendered output, fingerprint the engine as Jinja2, then escalate with the class-walker payload to prove RCE. ## Quick Start Test the name field on the target's profile page with {{77}} and ${77} to check for server-side template injection.

Frequently Asked Questions about hunt-ssti

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect server-side template injection in a web application?▼

Submit math-expression probes like {{7*7}}, ${7*7}, and <%= 7*7 %> into user-controlled fields. If the response renders 49 instead of the literal payload, the server evaluates template expressions, confirming SSTI and revealing the engine family.

How do I identify which template engine is vulnerable to SSTI?▼

Different engines evaluate different syntaxes: {{7*7}} works on Jinja2 and Twig, ${7*7} on Freemarker and Velocity, <%= 7*7 %> on ERB, and {{7*'7'}} returning 7777777 distinguishes Jinja2 from Twig. Error messages also frequently leak engine names.

Can SSTI lead to remote code execution?▼

Yes, SSTI commonly escalates to RCE because template engines expose the underlying runtime. Jinja2 uses class-walker payloads reaching os.popen, Twig uses registerUndefinedFilterCallback with exec, and ERB executes backtick commands directly.

Where should I test for SSTI vulnerabilities?▼

Target any user input rendered server-side: name and bio fields, email templates, invoice and PDF generators, CMS preview features, URL path parameters, search queries reflected in results, and HTTP headers echoed in responses.

Why is my confirmed SSTI not exploitable for RCE?▼

The engine may run in a sandboxed mode, such as Twig sandbox or Jinja2 SandboxedEnvironment, blocking runtime access. In that case the finding is Medium-severity SSTI or stored XSS rather than Critical RCE, and you should prove impact with an out-of-band callback before reporting.