nyx/tests/fixtures/ssti/php/unsafe_smarty_string_fetch.php
2026-05-07 01:29:31 -04:00

9 lines
279 B
PHP

<?php
// Unsafe: `$smarty->fetch("string:" . $src)` parses the inline template
// source via the `string:` resource prefix. Tainted $src yields SSTI.
function handler() {
$src = $_GET['template'];
$smarty = new \Smarty();
return $smarty->fetch("string:" . $src);
}