Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:composer/smarty/smarty@3.1.28
purl pkg:composer/smarty/smarty@3.1.28
Next non-vulnerable version 4.5.3
Latest non-vulnerable version 5.2.0
Risk 4.5
Vulnerabilities affecting this package (12)
Vulnerability Summary Fixed by
VCID-3829-yarc-yqh3
Aliases:
CVE-2023-28447
GHSA-7j98-h7fp-4vwj
smarty Cross-site Scripting vulnerability in Javascript escaping 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.
3.1.48
Affected by 1 other vulnerability.
4.3.1
Affected by 1 other vulnerability.
VCID-3xs3-13we-6ffu
Aliases:
CVE-2017-1000480
GHSA-9m49-vhwv-422g
Code Injection Smarty 3 is vulnerable to a PHP code injection when calling `fetch()` or `display()` functions on custom resources that does not sanitize template name.
3.1.32
Affected by 11 other vulnerabilities.
4.3.3
Affected by 1 other vulnerability.
VCID-4dmb-dnk6-6qdd
Aliases:
CVE-2022-29221
GHSA-634x-pc3q-cf4c
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.
3.1.45
Affected by 3 other vulnerabilities.
4.1.1
Affected by 3 other vulnerabilities.
VCID-a3yk-8fmf-x7fw
Aliases:
CVE-2024-35226
GHSA-4rmg-292m-wg3w
Smarty vulnerable to PHP Code Injection by malicious attribute in extends-tag Template authors could inject php code by choosing a malicous file name for an extends-tag. Users that cannot fully trust template authors should update asap.
4.5.3
Affected by 0 other vulnerabilities.
5.1.1
Affected by 0 other vulnerabilities.
5.2.0
Affected by 0 other vulnerabilities.
VCID-d7cx-7mkv-3qhe
Aliases:
CVE-2018-13982
GHSA-7gfx-wxfh-7rvm
Path Traversal `Smarty_Security::isTrustedResourceDir()` in Smarty 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.
3.1.33
Affected by 9 other vulnerabilities.
VCID-h2k4-cqfq-sbhw
Aliases:
CVE-2018-25047
GHSA-hwq7-5vv9-c6cf
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.
3.1.47
Affected by 2 other vulnerabilities.
4.2.1
Affected by 2 other vulnerabilities.
VCID-jhg5-tdyz-uyh4
Aliases:
CVE-2021-21408
GHSA-4h9c-v5vg-5m6m
Improper Input Validation Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. A vulnerability was found that may allow template authors could run restricted static php methods.
3.1.43
Affected by 4 other vulnerabilities.
4.0.0-rc.0
Affected by 1 other vulnerability.
4.0.3
Affected by 4 other vulnerabilities.
4.3.3
Affected by 1 other vulnerability.
VCID-mmfc-us8q-xbha
Aliases:
CVE-2021-29454
GHSA-29gp-2c3m-3j6m
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. 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.
3.1.42
Affected by 5 other vulnerabilities.
4.0.2
Affected by 5 other vulnerabilities.
VCID-qnee-xruu-sfb1
Aliases:
CVE-2023-41661
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') Auth. (admin+) Stored Cross-Site Scripting (XSS) vulnerability in PressPage Entertainment Inc. Smarty for WordPress plugin <= 3.1.35 versions.
3.1.36
Affected by 8 other vulnerabilities.
VCID-vnb9-5w8q-r3bd
Aliases:
CVE-2018-16831
GHSA-65j5-vpm7-6xp4
Path Traversal Smarty allows attackers to bypass the `trusted_dir` protection mechanism via a `/../` substring in an `include` statement.
3.1.33
Affected by 9 other vulnerabilities.
4.3.3
Affected by 1 other vulnerability.
VCID-xmrr-2jyf-5yhj
Aliases:
CVE-2021-26120
GHSA-3rpf-5rqv-689q
Code Injection Smarty allows code injection via an unexpected function name after a `{function name=` substring.
3.1.39
Affected by 6 other vulnerabilities.
VCID-zgxx-cfyu-1ffy
Aliases:
CVE-2021-26119
GHSA-w5hr-jm4j-9jvq
Trust Boundary Violation Smarty allows a Sandbox Escape because `$smarty.template_object` can be accessed in sandbox mode.
3.1.39
Affected by 6 other vulnerabilities.
Vulnerabilities fixed by this package (0)
Vulnerability Summary Aliases
This package is not known to fix vulnerabilities.

Date Actor Action Vulnerability Source VulnerableCode Version
2026-06-06T04:59:58.149351+00:00 GitLab Importer Affected by VCID-a3yk-8fmf-x7fw https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/smarty/smarty/CVE-2024-35226.yml 38.6.0
2026-06-06T04:10:20.153340+00:00 GitLab Importer Affected by VCID-qnee-xruu-sfb1 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/smarty/smarty/CVE-2023-41661.yml 38.6.0
2026-06-06T03:37:40.784635+00:00 GitLab Importer Affected by VCID-3829-yarc-yqh3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/smarty/smarty/CVE-2023-28447.yml 38.6.0
2026-06-06T02:52:09.690959+00:00 GitLab Importer Affected by VCID-h2k4-cqfq-sbhw https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/smarty/smarty/CVE-2018-25047.yml 38.6.0
2026-06-06T02:21:58.968956+00:00 GitLab Importer Affected by VCID-4dmb-dnk6-6qdd https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/smarty/smarty/CVE-2022-29221.yml 38.6.0
2026-06-06T01:16:58.091136+00:00 GitLab Importer Affected by VCID-jhg5-tdyz-uyh4 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/smarty/smarty/CVE-2021-21408.yml 38.6.0
2026-06-06T01:16:51.863173+00:00 GitLab Importer Affected by VCID-mmfc-us8q-xbha https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/smarty/smarty/CVE-2021-29454.yml 38.6.0
2026-06-04T20:45:17.363593+00:00 GitLab Importer Affected by VCID-zgxx-cfyu-1ffy https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/smarty/smarty/CVE-2021-26119.yml 38.6.0
2026-06-04T20:45:16.909298+00:00 GitLab Importer Affected by VCID-xmrr-2jyf-5yhj https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/smarty/smarty/CVE-2021-26120.yml 38.6.0
2026-06-04T20:14:48.995461+00:00 GitLab Importer Affected by VCID-d7cx-7mkv-3qhe https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/smarty/smarty/CVE-2018-13982.yml 38.6.0
2026-06-04T20:14:39.521850+00:00 GitLab Importer Affected by VCID-vnb9-5w8q-r3bd https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/smarty/smarty/CVE-2018-16831.yml 38.6.0
2026-06-04T20:10:39.186351+00:00 GitLab Importer Affected by VCID-3xs3-13we-6ffu https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/smarty/smarty/CVE-2017-1000480.yml 38.6.0