nyx/tests/fixtures/ssti/php/unsafe_smarty_string_fetch.php

10 lines
279 B
PHP
Raw Permalink Normal View History

2026-05-07 01:29:31 -04:00
<?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);
}