Security pattern / case archive

Server-Side Template Injection

Attacker-controlled content is compiled or evaluated as server-side template source instead of being passed to a fixed template strictly as data.

Common discovery signals
  • Template syntax is stored raw but its evaluated result appears in the rendered response.
  • A unique arithmetic expression returns the calculated server-side value instead of its original source text.
Safe validation approach

Begin with a harmless arithmetic expression, prove evaluation rather than reflection, preserve application state, and restore any temporary content immediately.

Related classifications

Related entries

Archive connections

Connected case files

01 record
CASE-007WEBVERSE
Connected evidence

Nolic

Authenticated Smarty SSTI to OS Command Execution

A public backup exposed an administrator SHA-256 digest. After recovering the password offline, I reproduced the Smarty SSTI and operating-system command execution in Caido and from the terminal. The original draft was restored after every test.