Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Finds server-side template injection flaws in a codebase via recon, parallel batched verification, and merge; writes sast/ssti-results.md.
Use this skill ↓68% 64%−5 ptsof test cases passed
Passed 14 of 22 test cases with the skill, and 15 of 22 without it.
3 of 3 safety checks passed
Not used yet
You are performing a focused security assessment to find Server-Side Template Injection vulnerabilities in a codebase. This skill uses a three-phase approach with subagents: recon (find candidate rendering sites where the template string is dynamic), batched verify (trace whether user input reaches each site's template argument, in parallel batches of 3), and merge (consolidate batch results into the final report).
Prerequisites: sast/architecture.md must exist. Run the analysis skill first if it doesn't.
Server-Side Template Injection occurs when user-supplied input is embedded directly into a template string that is then evaluated by a template engine. Unlike passing user data as context variables to a static template, SSTI means the user can write template syntax that the engine will execute — leading to arbitrary code execution, file read, or full server compromise.
The core pattern: unvalidated user input is used as the template string passed to a template engine's render/compile/evaluate function.
Passing user input as the template string to be compiled or rendered:
Template(user_input).render() — Jinja2env.from_string(user_input).render() — Jinja2render_template_string(user_input) — Flaskejs.render(user_input, ctx) — EJS (Node.js)nunjucks.renderString(user_input, ctx) — NunjucksHandlebars.compile(user_input)(ctx) — Handlebarspug.render(user_input, ctx) — Pug/Jade_.template(user_input)(ctx) — Lodash/UnderscoreVelocity.evaluate(ctx, user_input) — Apache Velocity (Java)new Template("anon", new StringReader(user_input), cfg).process(...) — FreeMarker (Java)new ST(user_input).render() — StringTemplate4 (Java)thymeleafEngine.process(user_input, ctx) — Thymeleaf (Java)\Twig\Environment::createTemplate(user_input)->render(ctx) — Twig (PHP)$smarty->fetch("string:" . user_input) — Smarty (PHP)Liquid::Template.parse(user_input).render(ctx) — Liquid (Ruby)ERB.new(user_input).result(binding) — ERB (Ruby)t, _ := template.New("x").Parse(user_input); t.Execute(w, data) — Go text/templateTemplate.fromString(user_input).render(ctx) — Pebble (Java)Dynamic template name construction where the name itself comes from user input and the engine resolves arbitrary files:
render_template(user_input) (Flask) where user_input is not validated against a safe listres.render(req.query.template) (Express) where the template name is user-controlledSkills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.