Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Ssti Analysis

ASecurity

Analyze server-side template injection risks — use when user input reaches template engines (Jinja, Twig, Freemarker, Pug, Liquid) or dynamic template compile/render APIs (CWE-1336 / A03:2021).

15 stars
0 votes
0 copies
0 views
Added 9/22/2026
securityrustgoexpressapisecurity

Works with

cliapi

Security Analysis

A100/100

Scanned 9/22/2026

Install to Claude Code

$npx -y skills add awarexone/AXguard --skill ssti-analysis --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ssti Analysis?

Add the live security badge to your README — it updates automatically with every re-scan.

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

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: ssti-analysis
description: Analyze server-side template injection risks — use when user input reaches template engines (Jinja, Twig, Freemarker, Pug, Liquid) or dynamic template compile/render APIs (CWE-1336 / A03:2021).
version: "1.0.0"
author: AwareXone
license: MIT
domain: application-security
subcategory: injection
tags: [ssti, templates, jinja, cwe-1336]
frameworks:
  cwe: [CWE-1336]
  owasp_top10: [A03:2021]
  owasp_api_top10: []
  owasp_llm_top10: []
  owasp_wstg: []
  owasp_asvs: []
  mitre_attack: []
  mitre_atlas: []
  nist_csf: []
  nist_ai_rmf: []
related_skills: [command-injection, xss-analysis, deserialization-security, security-triage, security-remediation]
related_commands: [/axguard-ssti, /axguard-inject, /axguard-audit]
related_rules: [ssti.]
references:
  - https://owasp.org/Top10/A03_2021-Injection/
  - https://cwe.mitre.org/data/definitions/1336.html
last_reviewed: "2026-09-15"
---

# SSTI Analysis

## Purpose

Encode practitioner reasoning for **Server-Side Template Injection (SSTI)**: attacker-influenced strings are evaluated as template code by the server template engine, often escalating to RCE or data disclosure.

## When to Use / When Not to Use

**Use when:**

- Code calls `render_template_string`, `Template(user)`, `compile(`, Pug/`_.template`, Twig string templates, Freemarker `StringTemplateLoader`, Liquid parse of user content.
- After AXguard hits `ssti.*`.
- Features like “custom email templates”, “report builders”, or “theme editors” accept template syntax from users.

**Do not use when:**

- Templates are static files and user data is passed only as **variables** into a fixed template (normal MVC rendering).
- Client-side-only template libs with no server evaluation (consider XSS instead).

## Security Concepts

SSTI is not “XSS on the server.” The engine **parses and executes** template language constructs (`{{ }}`, `{% %}`, expressions). Passing user input as data into a precompiled template is usually safe; building or compiling a template from user input is not.

## Threat Model

Attacker goals:

1. Remote code execution via template sandbox escapes.
2. Read secrets/env/config through template object graphs.
3. Bypass auth by evaluating expressions in privileged render paths.

## Analysis Workflow

1. Inventory template engines and versions (Jinja2, Mako, Twig, Freemarker, Velocity, Pug, EJS, Liquid).
2. Find **dynamic compile/render** APIs vs static template + context dict.
3. Trace whether any request/DB/AI field becomes the template **source string**.
4. Check sandbox / restricted environments — note they are often escapable; do not treat “sandbox=True” as automatic safe.
5. Distinguish design: admin-only template editors vs any-user input.
6. Assess impact by engine capabilities (file read, subprocess, class loading).
7. Prefer static confirmation of taint → compile/render over speculative payload design.

## Evidence Requirements

- File:line of template compile/render sink
- Attacker-controlled template source (not merely variables)
- Missing isolation (no sandbox / weak sandbox / privileged process)
- Impact class (RCE / file read / info disclosure) as hypothesis until validated

## False Positive Controls

- Fixed template path + user values only in context
- Template names selected from server allowlist (not raw body)
- Offline build-time templates with no runtime string compile
- Intentional SSTI unit fixtures

## Remediation

1. Never compile templates from untrusted strings; pass data as variables only.
2. If user-defined templates are required: strict sandbox, allowlisted tags/filters, separate least-privilege worker, no access to OS/app objects.
3. Prefer non-Turing template languages or logic-less templates for tenant customization.
4. Keep engines patched; disable dangerous extensions/plugins.

## Verification

```text
Detect dynamic template APIs → Remove user-as-template → Re-run axguard → Confirm only variable substitution remains
```

## Related Skills

- `command-injection` — common SSTI escalation class
- `xss-analysis` — if output is HTML without server evaluation
- `security-triage`, `security-remediation`

## Framework Mapping

- CWE-1336
- OWASP Top 10 2021 A03:2021 Injection

## References

- https://owasp.org/Top10/A03_2021-Injection/
- https://cwe.mitre.org/data/definitions/1336.html

## Research Provenance

Primary sources:

- OWASP Top 10:2021 A03 (accessed 2026-09-15)
- CWE-1336 (accessed 2026-09-15)

Secondary / internal:

- AXGuard `rules/ssti.json`, `/axguard-ssti`
- AwareXone Agentic-Bug-Hunter SSTI methodology (concepts only; not copied)

Datasets:

- UVID HF dataset — category linkage concepts only (MIT license metadata review 2026-09-15)

Attribution

awarexoneawarexone
View sourceMore from awarexone →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

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 (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Springboot Security

Java Spring Boot 服务中关于身份验证/授权、验证、CSRF、密钥、标头、速率限制和依赖安全的 Spring Security 最佳实践。

2456590 votes

Security Review

Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.

2456590 votes

Paperclip Task Bridge

Create, comment on, update, and list Paperclip tasks from Hermes using scoped Paperclip API credentials.

805540 votes

Summarize Status

Write a short, colloquial summary for a Paperclip summary slot: open with the 1–3 specific, concrete actions the reader needs to take right now to unblock the work, then a brief plain-language status, streaming progress as it works.

805540 votes

Paperclip Evals

Choose, inspect, validate, and report Paperclip Runner or Product E2E evaluations while preserving evidence, provenance, cost, and failure classification.

805540 votes
View all in security →