ssti-hunter — Claude Code subagent: SSTI detection and exploitation
ssti-hunter — a subagent for finding and exploiting Server-Side Template Injection (SSTI) across Jinja2, Twig, Velocity, FreeMarker, ERB, and Handlebars. Maps sandbox blocklists, identifies engine type, and chains bypasses to RCE.
no license ★ 1,298 updated 2026-06-12
.claude/agents/ssti-hunter.mdWhat ssti-hunter does
ssti-hunter targets Server-Side Template Injection vulnerabilities where user input flows into template engines. It handles the engines commonly found in PR automation, configuration systems, and customization interfaces. The subagent identifies engine type through polyglot probes, systematically maps which class attributes pass through sandbox filters, then hunts for gaps to reach arbitrary code execution.
Investigation starts by querying the writeup-search database for proven techniques rather than rediscovering 2019 exploits. All matrices and blocklists go to disk under evidence/<target>/ssti/. It distinguishes between parsing and rendering phases—Mergify's /configuration-simulator parses only, while /pulls/{n}/simulator renders and leaks values. The subagent works with CVE-2025-27516 (unsafe |attr('format') in Jinja ≤ 3.1.5), classical chains through __mro__ and __subclasses__, and filter evasion via hex encoding, bracket notation, and runtime string construction to bypass source-level regex filters.
What it helps with
- determine the template engine from application responses
- find class attributes not blocked by the sandbox
- build RCE chains through overlooked dunder methods
- bypass source-level filters on
__class__and__globals__ - map and persist sandbox blocklists per vulnerable surface
Example prompts for the agent
- Test this template form for SSTI and tell me which engine it runs
- Find the RCE path through the configuration language on this service
- Map the Jinja2 sandbox blocklist for this application
How to install ssti-hunter
Manually: put the files in place
.claude/agents/ssti-hunter.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/ssti-hunter.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/ssti-hunter.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about ssti-hunter
How do I install ssti-hunter in Claude Code?
Copy .claude/agents/ssti-hunter.md to your project's .claude/agents/ directory. The subagent will be available as an agent in the IDE.
What does ssti-hunter do?
It specializes in finding and exploiting Server-Side Template Injection vulnerabilities. It detects the template engine, maps sandbox restrictions, and discovers RCE paths through dunder methods and encoding bypasses.
Which template engines does ssti-hunter support?
Jinja2, Twig, Velocity, FreeMarker, ERB, Handlebars, and Thymeleaf. It works on any surface where user input renders through a template—PR automation rules, comments, admin-customizable templates.