CVE-2018-25047
Smarty Cross-site Scripting vulnerability in pages that use smarty_function_mailto
Reported by mitre · Published September 14, 2022
smarty/smarty is fixed in 4.2.1 and 3.1.47 (Packagist)
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 versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| smarty/smarty | Packagist | 4.2.1, 3.1.47 |
| smarty3 | Ubuntu:Pro:18.04:LTS | 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1 |
| smarty3 | Ubuntu:20.04:LTS | 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1 |
| smarty | smarty | 4.2.1, 3.1.47 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| smarty | smarty | 0, 4.0.0 |
| n/a | n/a | * |
Timeline
- Sep 14, 2022 CVE Published
- Sep 15, 2022 EPSS Score (30 in total, the first dated here)
- Nov 3, 2025 CVE Updated
- Mar 6, 2026 Distribution Patch
- Mar 6, 2026 Security Advisory (3 in total, the first dated here)
- Sep 21, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2018-25047
vulnetix vdb fixes CVE-2018-25047
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2018-25047/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- GLSA-202209-09 vendor-advisory
- [debian-lts-announce] 20230105 [SECURITY] [DLA 3262-1] smarty3 security update mailing-list
- https://nvd.nist.gov/vuln/detail/CVE-2018-25047 advisory
- https://github.com/advisories/GHSA-hwq7-5vv9-c6cf advisory
- https://github.com/smarty-php/smarty/commit/55ea25d1f50f0406fb1ccedd212c527977793fc9 patch
- https://github.com/FriendsOfPHP/security-advisories/blob/master/smarty/smarty/CVE-2018-25047.yaml url
- https://github.com/smarty-php/smarty url
- https://lists.debian.org/debian-lts-announce/2024/11/msg00013.html url