Every CVE Search/ Get API key

CVE-2018-25047

Smarty Cross-site Scripting vulnerability in pages that use smarty_function_mailto

5.4 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
Low
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
None

Exploit likelihood

1.10%Up 0.1 points since Sep 15, 2022
90%50%10%1%

What each source reports

NVD Score used 5.4

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.

Record
CVE-2018-25047
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2018-25047
Updated
2026-11-02
EUVDEUVD-2022-6844 No score

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.

Record
EUVD-2022-6844
Updated
2026-11-02
GitHub AdvisoriesGHSA-hwq7-5vv9-c6cf 5.4

Smarty Cross-site Scripting vulnerability in pages that use smarty_function_mailto

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.

Record
GHSA-hwq7-5vv9-c6cf
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSV 5.4

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.

Record
CVE-2018-25047
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVDEBIAN-CVE-2018-25047 5.4

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.

Record
DEBIAN-CVE-2018-25047
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
Show 4 moreShow less
OSVGHSA-hwq7-5vv9-c6cf 5.4

Smarty Cross-site Scripting vulnerability in pages that use smarty_function_mailto

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.

Record
GHSA-hwq7-5vv9-c6cf
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSVUBUNTU-CVE-2018-25047 5.4

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.

Record
UBUNTU-CVE-2018-25047
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVMGASA-2023-0014 No score

Updated php-smarty packages fix security vulnerability

It was discovered that there was a potential cross-site scripting vulnerability in smarty3, a widely-used PHP templating engine.

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. (CVE-2018-25047)

Record
MGASA-2023-0014
Updated
2026-11-02
OSVUSN-7158-1 No score

smarty3 vulnerabilities

It was discovered that Smarty incorrectly handled query parameters in requests. An attacker could possibly use this issue to inject arbitrary Javascript code, resulting in denial of service or potential execution of arbitrary code. This issue only affected Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, Ubuntu 22.04 LTS and Ubuntu 24.04 LTS. (CVE-2018-25047, CVE-2023-28447)

It was discovered that Smarty did not properly sanitize user input when generating templates. An attacker could, through PHP injection, possibly use this issue to execute arbitrary code. (CVE-2024-35226)

Record
USN-7158-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
smarty/smarty
Packagist
before 3.1.47
3.1.47
smarty/smarty
Packagist
4.0.0 up to 4.2.1
4.2.1
smarty3
Debian:12
before 3.1.47-1
3.1.47-1
smarty3
Debian:13
before 3.1.47-1
3.1.47-1
smarty3
Debian:14
before 3.1.47-1
3.1.47-1
smarty4
Debian:12
before 4.2.1-1
4.2.1-1
smarty4
Debian:13
before 4.2.1-1
4.2.1-1
smarty4
Debian:14
before 4.2.1-1
4.2.1-1
smarty3
Debian:10
before 3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u2, plus listed versions
3.1.33+20180830.1.3a78a21f+selfpack1-13.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1
3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u2
smarty3
Debian:11
From an advisory covering 3 CVEs
before 3.1.39-2+deb11u2, plus listed versions
3.1.39-13.1.39-23.1.39-2+deb11u1
3.1.39-2+deb11u2
Show 15 moreShow less
Affected packages
PackageAffectedFixed
smarty/smarty
Packagist
before 3.1.47, plus listed versions
v2.6.24v2.6.25v2.6.26v2.6.27v2.6.28
Show 40 moreShow less
v2.6.29v2.6.30v2.6.31v2.6.33v3.1.11v3.1.12v3.1.13v3.1.14v3.1.15v3.1.16v3.1.17v3.1.18v3.1.19v3.1.20v3.1.21v3.1.23v3.1.24v3.1.25v3.1.26v3.1.27v3.1.28v3.1.29v3.1.30v3.1.31v3.1.32v3.1.33v3.1.34v3.1.35v3.1.36v3.1.37v3.1.37.1v3.1.38v3.1.39v3.1.40v3.1.41v3.1.42v3.1.43v3.1.44v3.1.45v3.1.46
3.1.47
smarty/smarty
Packagist
4.0.0 up to 4.2.1, plus listed versions
v4.0.0v4.0.1v4.0.2v4.0.3v4.0.4v4.1.0v4.1.1v4.2.0
4.2.1
php-smarty
Mageia:8
before 4.2.1-1.mga8
4.2.1-1.mga8
smarty3
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
3.1.21-13.1.21-1ubuntu13.1.21-1ubuntu1+esm13.1.21-1ubuntu1+esm2
None known
smarty3
Ubuntu:Pro:18.04:LTS
before 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1, plus listed versions
3.1.31+20161214.1.c7d42e4+selfpack1-23.1.31+20161214.1.c7d42e4+selfpack1-33.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1
3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1
smarty3
Ubuntu:20.04:LTS
before 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1, plus listed versions
3.1.33+20180830.1.3a78a21f+selfpack1-13.1.34+20190228.1.c9f0de05+selfpack1-1
3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1
smarty3
Ubuntu:22.04:LTS
before 3.1.39-2ubuntu1.22.04.2, plus listed versions
3.1.39-23.1.39-2ubuntu13.1.39-2ubuntu1.22.04.1
3.1.39-2ubuntu1.22.04.2
smarty3
Ubuntu:24.04:LTS
before 3.1.48-1ubuntu0.24.04.1, plus listed versions
3.1.48-1
3.1.48-1ubuntu0.24.04.1
smarty3
Ubuntu:25.10
All versions, plus listed versions
3.1.48-2
None known
smarty3
Ubuntu:26.10
All versions, plus listed versions
3.1.48-2build1
None known
smarty3
Ubuntu:26.04:LTS
All versions, plus listed versions
3.1.48-23.1.48-2build1
None known
smarty3
Ubuntu:Pro:18.04:LTS
From an advisory covering 3 CVEs
before 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1, plus listed versions
3.1.31+20161214.1.c7d42e4+selfpack1-23.1.31+20161214.1.c7d42e4+selfpack1-33.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1
3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1
smarty3
Ubuntu:20.04:LTS
From an advisory covering 3 CVEs
before 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1, plus listed versions
3.1.33+20180830.1.3a78a21f+selfpack1-13.1.34+20190228.1.c9f0de05+selfpack1-1
3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1
smarty3
Ubuntu:22.04:LTS
From an advisory covering 3 CVEs
before 3.1.39-2ubuntu1.22.04.2, plus listed versions
3.1.39-23.1.39-2ubuntu13.1.39-2ubuntu1.22.04.1
3.1.39-2ubuntu1.22.04.2
smarty3
Ubuntu:24.04:LTS
From an advisory covering 3 CVEs
before 3.1.48-1ubuntu0.24.04.1, plus listed versions
3.1.48-1
3.1.48-1ubuntu0.24.04.1

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2018-25047 is a medium vulnerability (CVSS 5.4) in Smarty, published September 14, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.10%, the 65th percentile. Fixed in smarty/smarty 3.1.47.

References

Show 16 moreShow less
MoveEnter Open