ssti-jinja2

Exploit Jinja2 server-side template injection to achieve remote code execution.

253|37|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/blacklanternsecurity/red-run --skill ssti-jinja2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ssti-jinja2
Source: https://github.com/blacklanternsecurity/red-run/tree/main/skills/web/ssti-jinja2
Command: npx skills add https://github.com/blacklanternsecurity/red-run --skill ssti-jinja2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps penetration testers identify and exploit Server-Side Template Injection (SSTI) vulnerabilities in Python applications using Jinja2, Mako, Tornado, or Django templates.

Core Features & Use Cases

  • Engine Identification: Differentiates between Jinja2, Mako, Tornado, and Django template engines.
  • Information Extraction: Extracts configuration details, context variables, and file contents.
  • Remote Code Execution (RCE): Achieves RCE through various payload techniques, including context-free and MRO chains.
  • Filter Bypass: Provides methods to bypass common input filters like underscore, dot, and bracket restrictions.
  • Blind SSTI: Handles scenarios where direct output is not visible using error-based, boolean-based, time-based, and OOB techniques.
  • Use Case: A penetration tester encounters a web application that appears vulnerable to SSTI. They use this Skill to confirm the template engine, extract sensitive configuration data like the SECRET_KEY, and ultimately achieve remote code execution on the server.

Quick Start

Use the ssti-jinja2 skill to attempt remote code execution by exploiting a Jinja2 SSTI vulnerability on the target URL.

Frequently Asked Questions about ssti-jinja2

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

FAQPage Schema
How do I exploit Jinja2 server-side template injection to achieve remote code execution?

To achieve remote code execution via Jinja2 server-side template injection, you use context-free payloads and MRO chains to access underlying Python objects. This allows execution of arbitrary system commands on the target server during authorized penetration tests.

How can I identify which Python template engine is vulnerable to SSTI?

You can identify the vulnerable Python template engine by injecting specific test payloads that differentiate between Jinja2, Mako, Tornado, and Django. The application's response to these mathematical or string-based probes reveals the specific template engine processing the input.

How do I bypass input filters like underscore and bracket restrictions during template injection?

To bypass input filters like underscore, dot, and bracket restrictions during template injection, you can utilize alternative attribute access methods and string concatenation techniques. These filter bypass strategies allow you to construct effective payloads without triggering blocked characters.

Can I exploit blind SSTI when direct output is not visible in the response?

Yes, you can exploit blind SSTI when direct output is not visible by using error-based, boolean-based, time-based, and out-of-band (OOB) techniques. These methods infer template execution success through application response delays, error messages, or external network interactions.

How do I extract sensitive configuration data like the SECRET_KEY using Jinja2 SSTI?

To extract sensitive configuration data like the SECRET_KEY using Jinja2 SSTI, you inject payloads that access the application's configuration object and context variables. This allows you to read internal file contents and expose sensitive application settings directly from the template environment.