# ssti-hunter

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.

- subagent · `type=agent` · Claude Code, Cursor, Codex, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop) · ★ 1298 repo stars
- Author: H-mmer
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/H-mmer/pentest-agents/tree/HEAD/.claude/agents/ssti-hunter.md
- Updated: 2026-06-12
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/ssti-hunter

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/ssti-hunter.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/ssti-hunter.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/ssti-hunter.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/H-mmer/pentest-agents/tree/HEAD/.claude/agents/ssti-hunter.md

## When to use it
- 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
- 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

## Similar
- [hunt-ssti](https://affpapa.org/en/nevibecode/skills/hunt-ssti.md) — skill · ★ 16193 repo stars
- [ssti-server-side-template-injection](https://affpapa.org/en/nevibecode/skills/ssti-server-side-template-injection.md) — skill · 4000 installs
- [exploiting-template-injection-vulnerabilities](https://affpapa.org/en/nevibecode/skills/exploiting-template-injection-vulnerabilities.md) — skill · 266 installs
- [bizlogic-hunter](https://affpapa.org/en/nevibecode/agents/bizlogic-hunter.md) — subagent · ★ 2482 repo stars
- [injection](https://affpapa.org/en/nevibecode/skills/injection.md) — skill · 210 installs
- [deserialization-insecure](https://affpapa.org/en/nevibecode/skills/deserialization-insecure.md) — skill · 4000 installs

From the same set: [h-mmer/pentest-agents](https://affpapa.org/en/nevibecode/by/h-mmer/pentest-agents.md) — 43 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
