FixVibe

// 探测 / 聚焦

Server-Side Template Injection (SSTI)

When a template engine treats user input as a template, the server treats user input as code.

概要

Server-Side Template Injection is sneakier than its cousins. SQLi takes you to the database, XSS takes you to the user's browser — SSTI usually takes you straight to a shell on the application server. It happens when developers reach for a template engine's flexibility (let users add a name to the email subject) and let user input cross the line from data to code.

運作方式

Server-side template injection appears when user-controlled text is evaluated by a server template engine instead of being rendered as plain data. In severe cases, that can expose sensitive data or reach server-side execution paths.

影响范围

Most template engines, by design, can call into the host language. That means SSTI typically grades up to remote code execution: arbitrary shell commands, file reads, lateral movement into adjacent services, or just a reverse shell. Even on engines with sandboxes (Handlebars, Mustache without helpers) the attacker can usually exfiltrate context variables that include secrets and session data.

// what fixvibe checks

What FixVibe checks

FixVibe checks this class with verified-domain active testing that is bounded, non-destructive, and evidence-driven. Public reports describe the affected surface and remediation. For check-specific questions about exact detection heuristics, active payload details, or source-code rule patterns, contact support@fixvibe.app.

铁壁防御

Don't concatenate user input into templates. Pass user data as template variables, never as template source. If you must compose templates dynamically, use a sandboxed engine (Liquid is well-suited; Handlebars without runtime helpers is reasonable) and feed the user data as the data context only. As a second layer, run the rendering in a least-privileged process — separate Linux user, no shell, no network egress beyond what it needs. SSTI is one of the few classes where 'secure by construction' really applies — separate code from data and the entire family of bugs disappears.

// 在你自己的应用上跑一遍

放心继续发布,FixVibe 持续帮你看守风险。

FixVibe 像攻击者一样对你的应用公开面进行压力测试 —— 无代理、无安装、无信用卡。我们持续研究新的漏洞模式,并把它们转化成实用检查和可直接用于 Cursor、Claude、Copilot 的修复方案。

主動探測
103
本类别中触发的测试
模块
27
专属 主動探測 检查
每次扫描
384+
跨所有类别的测试
  • 免费 —— 无需信用卡,无需安装,无需 Slack 通知
  • 只需粘贴 URL —— 我们爬取、探测、生成报告
  • 按严重程度分级,去重至只剩信号
  • 最新 AI 修复提示词,可直接粘贴到 Cursor、Claude、Copilot
运行免费扫描

// 最新检查 · 实用修复 · 安心发布

Server-Side Template Injection (SSTI) — 漏洞聚焦 | FixVibe · FixVibe