smarty/smarty vulnerabilities

Smarty - the compiling PHP template engine

Registry
Composer
Latest
5.8.5
License
LGPL-3.0

18 known advisories

The latest version, 5.8.5, is not affected by any of them. Projects on older versions may be.

Update to the latest version:composer require smarty/smarty:^5.8.5

Is your project on an affected smarty/smarty?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Security advisories for smarty/smarty

  • MediumCVE-2026-62993GHSA-cq55-c7wv-pxmq1 Sept 2026

    Smarty: SSRF via redirect bypass of trusted_uri using {fetch}

    Affected
    >=5.0.0 <5.8.2 · <4.5.7
    Fixed in
    4.5.7, 5.8.2
  • MediumCVE-2026-62996GHSA-rjhh-76wf-8xmw7 Aug 2026

    Smarty Security stream restriction bypass through stream: resource

    Affected
    >=5.0.0 <5.8.4
    Fixed in
    5.8.4
  • MediumCVE-2026-62992GHSA-f6wf-28g6-769x7 Aug 2026

    Smarty: Symlink path traversal out of trusted directories

    Affected
    >=5.0.0 <5.8.2 · <4.5.7
    Fixed in
    4.5.7, 5.8.2
  • HighCVE-2024-35226GHSA-4rmg-292m-wg3w29 May 2024

    Smarty vulnerable to PHP Code Injection by malicious attribute in extends-tag

    Affected
    >=5.0.0 <5.1.1 · >=3.0.0 <4.5.3
    Fixed in
    4.5.3, 5.1.1
  • HighCVE-2023-28447GHSA-7j98-h7fp-4vwj29 Mar 2023

    smarty Cross-site Scripting vulnerability in Javascript escaping

    Affected
    >=4.0.0 <4.3.1 · <3.1.48
    Fixed in
    3.1.48, 4.3.1
  • MediumCVE-2018-25047GHSA-hwq7-5vv9-c6cf16 Sept 2022

    Smarty Cross-site Scripting vulnerability in pages that use smarty_function_mailto

    Affected
    <3.1.47 · >=4.0.0 <4.2.1
    Fixed in
    3.1.47, 4.2.1
  • HighCVE-2022-29221GHSA-634x-pc3q-cf4c25 May 2022

    PHP Code Injection by malicious block or filename in Smarty

    Affected
    <3.1.45 · >=4.0.0 <4.1.1
    Fixed in
    3.1.45, 4.1.1
  • MediumCVE-2012-4437GHSA-9gqj-ppv2-f2hq17 May 2022

    Cross-site Scripting in SmartyException

    Affected
    <3.1.12
    Fixed in
    3.1.12
  • HighCVE-2014-8350GHSA-2pmx-6mm6-6v7217 May 2022

    Smarty arbitrary PHP code execution

    Affected
    <3.1.21
    Fixed in
    3.1.21
  • CriticalCVE-2017-1000480GHSA-9m49-vhwv-422g14 May 2022

    Smarty PHP code injection

    Affected
    >=3 <3.1.32
    Fixed in
    3.1.32
  • MediumCVE-2018-16831GHSA-65j5-vpm7-6xp414 May 2022

    Smarty Path Traversal Vulnerability

    Affected
    <3.1.33
    Fixed in
    3.1.33
  • HighCVE-2018-13982GHSA-7gfx-wxfh-7rvm13 May 2022

    Smarty Path Traversal Vulnerability

    Affected
    <3.1.33
    Fixed in
    3.1.33
  • MediumCVE-2009-5054GHSA-6m9f-8vwq-97pm2 May 2022

    Smarty Does Not Consider Umask Values When Setting Permissions

    Affected
    <3.0.0-beta4
    Fixed in
    3.0.0-beta4
  • CriticalCVE-2011-1028GHSA-6frx-2r5w-c52422 Apr 2022

    Smarty3 Arbitrary PHP Code Execution

    Affected
    <3.0.7
    Fixed in
    3.0.7
  • HighCVE-2021-21408GHSA-4h9c-v5vg-5m6m12 Jan 2022

    Access to restricted PHP code by dynamic static class access in smarty

    Affected
    <3.1.43 · >=4.0.0 <4.0.3
    Fixed in
    3.1.43, 4.0.3
  • HighCVE-2021-29454GHSA-29gp-2c3m-3j6m12 Jan 2022

    Sandbox Escape by math function in smarty

    Affected
    <3.1.42 · >=4.0.0 <4.0.2
    Fixed in
    3.1.42, 4.0.2
  • HighCVE-2021-26119GHSA-w5hr-jm4j-9jvq2 Mar 2021

    Sandbox escape through template_object in smarty

    Affected
    <3.1.39
    Fixed in
    3.1.39
  • CriticalCVE-2021-26120GHSA-3rpf-5rqv-689q26 Feb 2021

    PHP Code Injection by malicious function name in smarty

    Affected
    <3.1.39
    Fixed in
    3.1.39

Is your smarty/smarty version vulnerable?

Which of your client projects still run an old smarty/smarty?

NPMscan reads the composer.lock in every GitHub repo you pick and checks each installed version against these advisories, including the packages your packages pull in. Each finding comes with the command that fixes it.

Other Composer packages

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily. Package details from the Composer registry.