Description
In Smarty before 3.1.47 and 4.x before 4.2.1, libs/plugins/function.mailto.php allows XSS. 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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | smarty3 | 3.1.47-1 | — |
| Debian 14 | smarty4 | 4.2.1-1 | — |
| Debian 13 | smarty3 | 3.1.47-1 | — |
| Debian 13 | smarty4 | 4.2.1-1 | — |
| Debian 12 | smarty3 | 3.1.47-1 | — |
| Debian 12 | smarty4 | 4.2.1-1 | — |
| Debian 11 | smarty3 | 3.1.39-2+deb11u2 | DLA-3956-1 |
| Debian 10 | smarty3 | 3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u2 | DLA-3262-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | smarty3 | No fix yet | — |
| Ubuntu 26.04 LTS | smarty3 | No fix yet | — |
| Ubuntu 25.10 | smarty3 | No fix yet | — |
| Ubuntu 24.04 LTS | smarty3 | 3.1.48-1ubuntu0.24.04.1 | USN-7158-1 |
| Ubuntu 22.04 LTS | smarty3 | 3.1.39-2ubuntu1.22.04.2 | USN-7158-1 |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | smarty3 | 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1 | USN-7158-1 |
| Ubuntu Pro 18.04 LTS | smarty3 | 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1 | USN-7158-1 |
| Ubuntu Pro 16.04 LTS | smarty3 | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | smarty/smarty | < 3.1.47 | 3.1.47 | GHSA-hwq7-5vv9-c6cf |
| Packagist | smarty/smarty | >= 4.0.0, < 4.2.1 | 4.2.1 | GHSA-hwq7-5vv9-c6cf |
Advisories 3
- USN-7158-1 smarty3 vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- DLA-3956-1 smarty3 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-3262-1 smarty3 - security update Debian Security (DSA / DLA) · Mar 9, 2026
References
- https://github.com/smarty-php/smarty/issues/454
- https://github.com/smarty-php/smarty/releases/tag/v4.2.1
- https://github.com/smarty-php/smarty/releases/tag/v3.1.47
- https://bugs.gentoo.org/870100
- GLSA-202209-09 vendor-advisory
- [debian-lts-announce] 20230105 [SECURITY] [DLA 3262-1] smarty3 security update mailing-list