-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
smarty_function_mailto - JavaScript injection in eval function #454
Comments
Definitely a security risk, esp when users on a website can provide their own mail address in a profile for example. And there's an issue with html escaping not being done too. See:
page1.tpl
then open output.html in your browser. Choosing |
Savvy Smarty users might have circumvented this bug by doing |
…counter injection attacks Fixes #454
I found a bug in the Smarty package, specifically in the smarty_function_mailto($params) function.
Remote exploitation of such vulnerability is unlikely, but it is still advisable to take it into account.
A web page that uses this function and that could be parameterized using GET or POST input parameters could cause the injection of JavaScript code of a malicious user and cause cross-site scripting attacks.
Using the following code you can inject JavaScript code into the smarty_function_mailto function.
===============================================================
$params = array(
'encode'=>'javascript',
'address'=>'[email protected]">[email protected]'); alert("- JavaScript Injected -"); //',
);
echo smarty_function_mailto($params);
===============================================================
The text was updated successfully, but these errors were encountered: