smarty CVE Vulnerabilities & Metrics

Focus on smarty vulnerabilities and metrics.

Last updated: 08 Mar 2025, 23:25 UTC

About smarty Security Exposure

This page consolidates all known Common Vulnerabilities and Exposures (CVEs) associated with smarty. We track both calendar-based metrics (using fixed periods) and rolling metrics (using gliding windows) to give you a comprehensive view of security trends and risk evolution. Use these insights to assess risk and plan your patching strategy.

For a broader perspective on cybersecurity threats, explore the comprehensive list of CVEs by vendor and product. Stay updated on critical vulnerabilities affecting major software and hardware providers.

Global CVE Overview

Total smarty CVEs: 12
Earliest CVE date: 02 May 2005, 04:00 UTC
Latest CVE date: 29 Sep 2023, 14:15 UTC

Latest CVE reference: CVE-2023-41661

Rolling Stats

30-day Count (Rolling): 0
365-day Count (Rolling): 0

Calendar-based Variation

Calendar-based Variation compares a fixed calendar period (e.g., this month versus the same month last year), while Rolling Growth Rate uses a continuous window (e.g., last 30 days versus the previous 30 days) to capture trends independent of calendar boundaries.

Variations & Growth

Month Variation (Calendar): 0%
Year Variation (Calendar): -100.0%

Month Growth Rate (30-day Rolling): 0.0%
Year Growth Rate (365-day Rolling): -100.0%

Monthly CVE Trends (current vs previous Year)

Annual CVE Trends (Last 20 Years)

Critical smarty CVEs (CVSS ≥ 9) Over 20 Years

CVSS Stats

Average CVSS: 6.92

Max CVSS: 10.0

Critical CVEs (≥9): 8

CVSS Range vs. Count

Range Count
0.0-3.9 3
4.0-6.9 7
7.0-8.9 13
9.0-10.0 8

CVSS Distribution Chart

Top 5 Highest CVSS smarty CVEs

These are the five CVEs with the highest CVSS scores for smarty, sorted by severity first and recency.

All CVEs for smarty

CVE-2023-41661 smarty vulnerability CVSS: 0 29 Sep 2023, 14:15 UTC

Auth. (admin+) Stored Cross-Site Scripting (XSS) vulnerability in PressPage Entertainment Inc. Smarty for WordPress plugin <= 3.1.35 versions.

CVE-2023-28447 smarty vulnerability CVSS: 0 28 Mar 2023, 21:15 UTC

Smarty is a template engine for PHP. In affected versions smarty did not properly escape javascript code. An attacker could exploit this vulnerability to execute arbitrary JavaScript code in the context of the user's browser session. This may lead to unauthorized access to sensitive user data, manipulation of the web application's behavior, or unauthorized actions performed on behalf of the user. Users are advised to upgrade to either version 3.1.48 or to 4.3.1 to resolve this issue. There are no known workarounds for this vulnerability.

CVE-2018-25047 smarty vulnerability CVSS: 0 15 Sep 2022, 00:15 UTC

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-2022-29221 smarty vulnerability CVSS: 6.5 24 May 2022, 15:15 UTC

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.45 and 4.1.1, template authors could inject php code by choosing a malicious {block} name or {include} file name. Sites that cannot fully trust template authors should upgrade to versions 3.1.45 or 4.1.1 to receive a patch for this issue. There are currently no known workarounds.

CVE-2021-29454 smarty vulnerability CVSS: 6.5 10 Jan 2022, 20:15 UTC

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.42 and 4.0.2, template authors could run arbitrary PHP code by crafting a malicious math string. If a math string was passed through as user provided data to the math function, external users could run arbitrary PHP code by crafting a malicious math string. Users should upgrade to version 3.1.42 or 4.0.2 to receive a patch.

CVE-2021-21408 smarty vulnerability CVSS: 6.5 10 Jan 2022, 20:15 UTC

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.43 and 4.0.3, template authors could run restricted static php methods. Users should upgrade to version 3.1.43 or 4.0.3 to receive a patch.

CVE-2021-26120 smarty vulnerability CVSS: 7.5 22 Feb 2021, 02:15 UTC

Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring.

CVE-2021-26119 smarty vulnerability CVSS: 5.0 22 Feb 2021, 02:15 UTC

Smarty before 3.1.39 allows a Sandbox Escape because $smarty.template_object can be accessed in sandbox mode.

CVE-2011-1028 smarty vulnerability CVSS: 7.5 20 Nov 2019, 15:15 UTC

The $smarty.template variable in Smarty3 allows attackers to possibly execute arbitrary PHP code via the sysplugins/smarty_internal_compile_private_special_variable.php file.

CVE-2018-13982 smarty vulnerability CVSS: 5.0 18 Sep 2018, 21:29 UTC

Smarty_Security::isTrustedResourceDir() in Smarty before 3.1.33 is prone to a path traversal vulnerability due to insufficient template code sanitization. This allows attackers controlling the executed template code to bypass the trusted directory security restriction and read arbitrary files.

CVE-2018-16831 smarty vulnerability CVSS: 7.1 11 Sep 2018, 13:29 UTC

Smarty before 3.1.33-dev-4 allows attackers to bypass the trusted_dir protection mechanism via a file:./../ substring in an include statement.

CVE-2017-1000480 smarty vulnerability CVSS: 7.5 03 Jan 2018, 18:29 UTC

Smarty 3 before 3.1.32 is vulnerable to a PHP code injection when calling fetch() or display() functions on custom resources that does not sanitize template name.

CVE-2014-8350 smarty vulnerability CVSS: 7.5 03 Nov 2014, 16:55 UTC

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.

CVE-2012-4437 smarty vulnerability CVSS: 4.3 01 Oct 2012, 03:26 UTC

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 that trigger a Smarty exception.

CVE-2012-4277 smarty vulnerability CVSS: 4.3 13 Aug 2012, 22:55 UTC

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 to inject arbitrary web script or HTML via unspecified vectors.

CVE-2010-4727 smarty vulnerability CVSS: 10.0 03 Feb 2011, 17:00 UTC

Smarty before 3.0.0 beta 7 does not properly handle the <?php and ?> tags, which has unspecified impact and remote attack vectors.

CVE-2010-4726 smarty vulnerability CVSS: 10.0 03 Feb 2011, 17:00 UTC

Unspecified vulnerability in the math plugin in Smarty before 3.0.0 RC1 has unknown impact and remote attack vectors. NOTE: this might overlap CVE-2009-1669.

CVE-2010-4725 smarty vulnerability CVSS: 10.0 03 Feb 2011, 17:00 UTC

Smarty before 3.0.0 RC3 does not properly handle an on value of the asp_tags option in the php.ini file, which has unspecified impact and remote attack vectors.

CVE-2010-4724 smarty vulnerability CVSS: 10.0 03 Feb 2011, 17:00 UTC

Multiple unspecified vulnerabilities in the parser implementation in Smarty before 3.0.0 RC3 have unknown impact and remote attack vectors.

CVE-2010-4723 smarty vulnerability CVSS: 9.3 03 Feb 2011, 17:00 UTC

Smarty before 3.0.0, when security is enabled, does not prevent access to the (1) dynamic and (2) private object members of an assigned object, which has unspecified impact and remote attack vectors.

CVE-2010-4722 smarty vulnerability CVSS: 10.0 03 Feb 2011, 17:00 UTC

Unspecified vulnerability in the fetch plugin in Smarty before 3.0.2 has unknown impact and remote attack vectors.

CVE-2009-5054 smarty vulnerability CVSS: 7.5 03 Feb 2011, 17:00 UTC

Smarty before 3.0.0 beta 4 does not consider the umask value when setting the permissions of files, which might allow attackers to bypass intended access restrictions via standard filesystem operations.

CVE-2009-5053 smarty vulnerability CVSS: 7.5 03 Feb 2011, 17:00 UTC

Unspecified vulnerability in Smarty before 3.0.0 beta 6 allows remote attackers to execute arbitrary PHP code by injecting this code into a cache file.

CVE-2009-5052 smarty vulnerability CVSS: 10.0 03 Feb 2011, 17:00 UTC

Multiple unspecified vulnerabilities in Smarty before 3.0.0 beta 6 have unknown impact and attack vectors.

CVE-2009-1669 smarty vulnerability CVSS: 10.0 18 May 2009, 18:30 UTC

The smarty_function_math function in libs/plugins/function.math.php in Smarty 2.6.22 allows context-dependent attackers to execute arbitrary commands via shell metacharacters in the equation attribute of the math function. NOTE: some of these details are obtained from third party information.

CVE-2008-4811 smarty vulnerability CVSS: 7.5 31 Oct 2008, 18:09 UTC

The _expand_quoted_text function in libs/Smarty_Compiler.class.php in Smarty 2.6.20 r2797 and earlier allows remote attackers to execute arbitrary PHP code via vectors related to templates and a \ (backslash) before a dollar-sign character.

CVE-2008-4810 smarty vulnerability CVSS: 7.5 31 Oct 2008, 18:09 UTC

The _expand_quoted_text function in libs/Smarty_Compiler.class.php in Smarty 2.6.20 before r2797 allows remote attackers to execute arbitrary PHP code via vectors related to templates and (1) a dollar-sign character, aka "php executed in templates;" and (2) a double quoted literal string, aka a "function injection security hole." NOTE: each vector affects slightly different SVN revisions.

CVE-2008-1066 smarty vulnerability CVSS: 7.5 28 Feb 2008, 20:44 UTC

The modifier.regex_replace.php plugin in Smarty before 2.6.19, as used by Serendipity (S9Y) and other products, allows attackers to call arbitrary PHP functions via templates, related to a '\0' character in a search string.

CVE-2006-7193 smarty vulnerability CVSS: 7.5 12 Apr 2007, 19:19 UTC

PHP remote file inclusion vulnerability in unit_test/test_cases.php in Smarty 2.6.1 allows remote attackers to execute arbitrary PHP code via a URL in the SMARTY_DIR parameter. NOTE: this issue is disputed by CVE and a third party because SMARTY_DIR is a constant

CVE-2006-7105 smarty vulnerability CVSS: 7.5 03 Mar 2007, 21:19 UTC

PHP remote file inclusion vulnerability in libs/Smarty.class.php in Smarty 2.6.9 allows remote attackers to execute arbitrary PHP code via a URL in the filename parameter. NOTE: in the original disclosure, filename is used in a function definition, so this report is probably incorrect

CVE-2005-0913 smarty vulnerability CVSS: 7.5 02 May 2005, 04:00 UTC

Unknown vulnerability in the regex_replace modifier (modifier.regex_replace.php) in Smarty before 2.6.8 allows attackers to execute arbitrary PHP code.