MediumGHSA-hwq7-5vv9-c6cfCVE-2018-25047

Smarty Cross-site Scripting vulnerability in pages that use smarty_function_mailto

Published 16 Sept 2022 · Updated 4 Nov 2025

Affected packages

Affected
<3.1.47
Fixed in
3.1.47
Update to the fixed version for your release line, for example:composer require smarty/smarty:^3.1.47
Affected
>=4.0.0 <4.2.1
Fixed in
4.2.1
Update to the fixed version for your release line, for example:composer require smarty/smarty:^4.2.1

Details

In Smarty before 3.1.47 and 4.x before 4.2.1, libs/plugins/function.mailto.php allows cross-site scripting. A web page that uses smarty_function_mailto, and that could be parameterized using GET or POST input parameters, could allow injection of JavaScript code by a user.

Is GHSA-hwq7-5vv9-c6cf in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected smarty/smarty, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.