CVE-2018-25047 json
Smarty Cross-site Scripting vulnerability in pages that use smarty_function_mailto
published 2022-09-14 4 y ago modified 2026-06-17 4 mo ago also GHSA-hwq7-5vv9-c6cf , EUVD-2022-6844
- cvss
- 5.4
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.2%
- EPSS 1.2% chance of exploitation in 30 days, percentile 67%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- packagist smarty/smarty 3.1.47, 4.2.1
- smarty smarty 3.1.47, 4.2.1
- smarty3 Debian 14, Debian 13, Debian 12 3.1.47-1
- smarty4 Debian 14, Debian 13, Debian 12 4.2.1-1
debian advisories DEBIAN-CVE-2018-25047
- smarty3 Ubuntu 20.04 LTS 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1
- smarty3 Ubuntu 22.04 LTS 3.1.39-2ubuntu1.22.04.2
- smarty3 Ubuntu 24.04 LTS 3.1.48-1ubuntu0.24.04.1
- smarty3 Ubuntu Pro 18.04 LTS 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1
ubuntu advisories UBUNTU-CVE-2018-25047
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Exploit prediction
1.17% chance of exploitation in the next 30 days, higher than 67% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/smarty-php/smarty/issues/454 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | smarty/smarty | <3.1.47 >=4.0.0, <4.2.1 |
3.1.47 4.2.1 |
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/smarty-php/smarty/issues/454
web, exploit, issue-tracking, patch, third-party-advisory
-
github.com
/smarty-php/smarty/commit/55ea25d1f50f0406fb1ccedd212c527977793fc9
web
-
security.gentoo.org
/glsa/202209-09
vendor-advisory, web, third-party-advisory
-
github.com
/smarty-php/smarty/releases/tag/v4.2.1
web, release-notes
-
github.com
/smarty-php/smarty/releases/tag/v3.1.47
web, release-notes
-
bugs.gentoo.org
/870100
web, issue-tracking, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2023/01/msg00002.html
mailing-list, web, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2024/11/msg00013.html
web
-
nvd.nist.gov
/vuln/detail/CVE-2018-25047
advisory
-
github.com
/FriendsOfPHP/security-advisories/blob/master/smarty/smarty/CVE-2018-25047.yaml
web
-
github.com
/smarty-php/smarty
package
Sources
- CVE List CVE-2018-25047
- GitHub Advisory GHSA-hwq7-5vv9-c6cf
- NVD CVE-2018-25047
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.