Skip to main content

Smarty

13 CVEs product

Monthly

CVE-2026-62993 Aug 31, 20:58 PHP MEDIUM PATCH GHSA This Month

Server-side request forgery in Smarty's {fetch} template function (versions prior to 4.5.7 on the 4.x line and 5.8.2 on the 5.x line) allows network-accessible attackers to bypass the trusted_uri allowlist and reach arbitrary internal endpoints by exploiting PHP's default redirect-following behavior. The security policy's isTrustedUri() check validates only the initial URL; when file_get_contents() silently follows an HTTP redirect placed on a trusted host, the request lands on an attacker-chosen internal target, enabling SSRF to services such as cloud metadata endpoints or internal APIs. No public exploit has been identified at time of analysis, and the vulnerability is not listed in the CISA KEV catalog.

PHP SSRF Open Redirect Smarty Smarty Php
NVD GitHub
CVSS 4.0
6.9
EPSS
0.4%
CVE-2026-62996 Aug 07, 15:04 PHP MEDIUM POC PATCH GHSA This Month

Smarty PHP template engine versions 5.0.0 through 5.8.3 expose a security policy bypass allowing file disclosure via the built-in `stream:` resource type. When Smarty Security is enabled and `Security::$streams` is set to `null` or a restricted allowlist, an attacker able to author or influence a template resource reference can use `stream:php://filter/...` to read arbitrary local files accessible to the PHP process - bypassing the very control intended to block such access. A public proof-of-concept was disclosed in GHSA-rjhh-76wf-8xmw; no active exploitation is confirmed in CISA KEV. The issue is fixed in v5.8.4.

PHP Path Traversal Smarty Smarty Php
NVD VulDB GitHub
CVSS 4.0
6.9
EPSS
0.3%
CVE-2026-62992 Aug 07, 15:02 PHP MEDIUM PATCH GHSA This Month

Symlink-based path traversal in Smarty's Security::_checkDir() allows an attacker who can place a symbolic link inside a trusted directory (such as a template or upload path) to read arbitrary files accessible to the PHP process, bypassing the configured secure_dir sandbox entirely. Affected are Smarty 5.x versions prior to 5.8.2 and all 4.x releases prior to 4.5.7, when Smarty's Security policy is enabled. The root cause is that _checkDir() resolves paths via string normalization only, while the underlying file_get_contents() call faithfully follows symlinks to their targets outside the sandbox. No public exploit code or CISA KEV listing has been identified at time of analysis.

PHP Path Traversal Smarty Smarty Php
NVD VulDB GitHub
CVSS 4.0
6.9
EPSS
0.4%
CVE-2023-41661 Sep 29, 14:15 MEDIUM This Month

Auth. Rated medium severity (CVSS 4.8), this vulnerability is remotely exploitable, low attack complexity. No vendor patch available.

WordPress XSS Smarty
NVD
CVSS 3.1
4.8
EPSS
0.4%
CVE-2023-28447 Mar 28, 21:15 PHP MEDIUM PATCH This Month

Smarty is a template engine for PHP. Rated medium severity (CVSS 6.1), this vulnerability is remotely exploitable, no authentication required, low attack complexity. This Cross-Site Scripting (XSS) vulnerability could allow attackers to inject malicious scripts into web pages viewed by other users.

XSS Authentication Bypass Fedora Smarty Fedoraproject
NVD GitHub
CVSS 3.1
6.1
EPSS
1.0%
CVE-2022-29221 May 24, 15:15 PHP HIGH PATCH This Week

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, low attack complexity. This Code Injection vulnerability could allow attackers to inject and execute arbitrary code within the application.

PHP RCE Code Injection Debian Debian Linux +3
NVD GitHub
CVSS 3.1
8.8
EPSS
4.5%
CVE-2021-26120 Feb 22, 02:15 PHP CRITICAL PATCH Act Now

Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable, no authentication required, low attack complexity.

RCE Code Injection Debian Debian Linux Smarty
NVD GitHub
CVSS 3.1
9.8
EPSS
82.3%
CVE-2021-26119 Feb 22, 02:15 PHP HIGH PATCH This Week

Smarty before 3.1.39 allows a Sandbox Escape because $smarty.template_object can be accessed in sandbox mode. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no authentication required, low attack complexity.

Information Disclosure Debian Debian Linux Smarty
NVD GitHub
CVSS 3.1
7.5
EPSS
9.4%
CVE-2018-13982 Sep 18, 21:29 PHP HIGH POC PATCH This Week

Smarty_Security::isTrustedResourceDir() in Smarty before 3.1.33 is prone to a path traversal vulnerability due to insufficient template code sanitization. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no authentication required, low attack complexity. Public exploit code available.

Path Traversal Debian Debian Linux Smarty
NVD GitHub
CVSS 3.1
7.5
EPSS
3.5%
CVE-2018-16831 Sep 11, 13:29 PHP MEDIUM POC PATCH This Month

Smarty before 3.1.33-dev-4 allows attackers to bypass the trusted_dir protection mechanism via a file:./../ substring in an include statement. Rated medium severity (CVSS 5.9), this vulnerability is remotely exploitable, no authentication required. Public exploit code available and no vendor patch available.

Path Traversal Smarty
NVD GitHub
CVSS 3.0
5.9
EPSS
2.7%
CVE-2014-8350 Nov 03, 16:55 PHP HIGH POC PATCH This Week

Smarty before 3.1.21 allows remote attackers to bypass the secure mode restrictions and execute arbitrary PHP code as demonstrated by "{literal}<{/literal}script language=php>" in a template. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, low attack complexity. Public exploit code available.

PHP RCE Code Injection Smarty
NVD
CVSS 2.0
7.5
EPSS
0.5%
CVE-2012-4437 Oct 01, 03:26 PHP MEDIUM PATCH This Month

Cross-site scripting (XSS) vulnerability in the SmartyException class in Smarty (aka smarty-php) before 3.1.12 allows remote attackers to inject arbitrary web script or HTML via unspecified vectors. Rated medium severity (CVSS 4.3), this vulnerability is remotely exploitable.

XSS Smarty
NVD
CVSS 2.0
4.3
EPSS
0.6%
CVE-2012-4277 Aug 13, 22:55 MEDIUM POC PATCH This Month

Cross-site scripting (XSS) vulnerability in the smarty_function_html_options_optoutput function in distribution/libs/plugins/function.html_options.php in Smarty before 3.1.8 allows remote attackers. Rated medium severity (CVSS 4.3), this vulnerability is remotely exploitable. Public exploit code available.

PHP XSS Smarty
NVD
CVSS 2.0
4.3
EPSS
0.3%
EPSS 0% CVSS 6.9
MEDIUM PATCH This Month

Server-side request forgery in Smarty's {fetch} template function (versions prior to 4.5.7 on the 4.x line and 5.8.2 on the 5.x line) allows network-accessible attackers to bypass the trusted_uri allowlist and reach arbitrary internal endpoints by exploiting PHP's default redirect-following behavior. The security policy's isTrustedUri() check validates only the initial URL; when file_get_contents() silently follows an HTTP redirect placed on a trusted host, the request lands on an attacker-chosen internal target, enabling SSRF to services such as cloud metadata endpoints or internal APIs. No public exploit has been identified at time of analysis, and the vulnerability is not listed in the CISA KEV catalog.

PHP SSRF Open Redirect +2
NVD GitHub
EPSS 0% CVSS 6.9
MEDIUM POC PATCH This Month

Smarty PHP template engine versions 5.0.0 through 5.8.3 expose a security policy bypass allowing file disclosure via the built-in `stream:` resource type. When Smarty Security is enabled and `Security::$streams` is set to `null` or a restricted allowlist, an attacker able to author or influence a template resource reference can use `stream:php://filter/...` to read arbitrary local files accessible to the PHP process - bypassing the very control intended to block such access. A public proof-of-concept was disclosed in GHSA-rjhh-76wf-8xmw; no active exploitation is confirmed in CISA KEV. The issue is fixed in v5.8.4.

PHP Path Traversal Smarty +1
NVD VulDB GitHub
EPSS 0% CVSS 6.9
MEDIUM PATCH This Month

Symlink-based path traversal in Smarty's Security::_checkDir() allows an attacker who can place a symbolic link inside a trusted directory (such as a template or upload path) to read arbitrary files accessible to the PHP process, bypassing the configured secure_dir sandbox entirely. Affected are Smarty 5.x versions prior to 5.8.2 and all 4.x releases prior to 4.5.7, when Smarty's Security policy is enabled. The root cause is that _checkDir() resolves paths via string normalization only, while the underlying file_get_contents() call faithfully follows symlinks to their targets outside the sandbox. No public exploit code or CISA KEV listing has been identified at time of analysis.

PHP Path Traversal Smarty +1
NVD VulDB GitHub
EPSS 0% CVSS 4.8
MEDIUM This Month

Auth. Rated medium severity (CVSS 4.8), this vulnerability is remotely exploitable, low attack complexity. No vendor patch available.

WordPress XSS Smarty
NVD
EPSS 1% CVSS 6.1
MEDIUM PATCH This Month

Smarty is a template engine for PHP. Rated medium severity (CVSS 6.1), this vulnerability is remotely exploitable, no authentication required, low attack complexity. This Cross-Site Scripting (XSS) vulnerability could allow attackers to inject malicious scripts into web pages viewed by other users.

XSS Authentication Bypass Fedora +2
NVD GitHub
EPSS 5% CVSS 8.8
HIGH PATCH This Week

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, low attack complexity. This Code Injection vulnerability could allow attackers to inject and execute arbitrary code within the application.

PHP RCE Code Injection +5
NVD GitHub
EPSS 82% CVSS 9.8
CRITICAL PATCH Act Now

Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable, no authentication required, low attack complexity.

RCE Code Injection Debian +2
NVD GitHub
EPSS 9% CVSS 7.5
HIGH PATCH This Week

Smarty before 3.1.39 allows a Sandbox Escape because $smarty.template_object can be accessed in sandbox mode. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no authentication required, low attack complexity.

Information Disclosure Debian Debian Linux +1
NVD GitHub
EPSS 3% CVSS 7.5
HIGH POC PATCH This Week

Smarty_Security::isTrustedResourceDir() in Smarty before 3.1.33 is prone to a path traversal vulnerability due to insufficient template code sanitization. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no authentication required, low attack complexity. Public exploit code available.

Path Traversal Debian Debian Linux +1
NVD GitHub
EPSS 3% CVSS 5.9
MEDIUM POC PATCH This Month

Smarty before 3.1.33-dev-4 allows attackers to bypass the trusted_dir protection mechanism via a file:./../ substring in an include statement. Rated medium severity (CVSS 5.9), this vulnerability is remotely exploitable, no authentication required. Public exploit code available and no vendor patch available.

Path Traversal Smarty
NVD GitHub
EPSS 0% CVSS 7.5
HIGH POC PATCH This Week

Smarty before 3.1.21 allows remote attackers to bypass the secure mode restrictions and execute arbitrary PHP code as demonstrated by "{literal}<{/literal}script language=php>" in a template. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, low attack complexity. Public exploit code available.

PHP RCE Code Injection +1
NVD
EPSS 1% CVSS 4.3
MEDIUM PATCH This Month

Cross-site scripting (XSS) vulnerability in the SmartyException class in Smarty (aka smarty-php) before 3.1.12 allows remote attackers to inject arbitrary web script or HTML via unspecified vectors. Rated medium severity (CVSS 4.3), this vulnerability is remotely exploitable.

XSS Smarty
NVD
EPSS 0% CVSS 4.3
MEDIUM POC PATCH This Month

Cross-site scripting (XSS) vulnerability in the smarty_function_html_options_optoutput function in distribution/libs/plugins/function.html_options.php in Smarty before 3.1.8 allows remote attackers. Rated medium severity (CVSS 4.3), this vulnerability is remotely exploitable. Public exploit code available.

PHP XSS Smarty
NVD

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy