Server-Side Template Injection (SSTI)
Detects user-controlled input passed directly into template rendering engines, enabling code execution.
от zakirkun★ 40 звёзд на GitHub
Установить Server-Side Template Injection (SSTI) в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Server-Side Template Injection (SSTI)
Overview
SSTI occurs when user input is embedded directly into a template string before rendering. Template engines like Jinja2, Twig, Pebble, Freemarker, and Mustache can interpret injected expressions as code, leading to Remote Code Execution (RCE).
Classic payload: {{7*7}} → if output is 49, the template is evaluating user input.
Detection Strategy
Look for template render() calls that concatenate user input directly into the template string rather than passing it as a context variable.
Key patterns:
render_template_string(user_input)in Flask/Jinja2new Template(user_input).render()in various engines- String format operations feeding user data into template strings
Remediation
Never put user input in the template string. Always pass user data as template variables.
Vulnerable (Python/Jinja2):
from flask import render_template_string, request
@app.route('/greet')
def greet():
name = request.args.get('name')
return render_template_string(f"Hello {name}!") # SSTI!
Safe (Python/Jinja2):
@app.route('/greet')
def greet():
name = request.args.get('name')
return render_template_string("Hello {{ name }}!", name=name)
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- patterns.yaml
FAQ
Что делает скилл Server-Side Template Injection (SSTI)?
Detects user-controlled input passed directly into template rendering engines, enabling code execution.
Как установить скилл Server-Side Template Injection (SSTI)?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Server-Side Template Injection (SSTI) запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…