p PatchFirst

PatchFirst · Latest vulnerabilities

smarty4 vulnerabilities

Vulnerabilities published for smarty4 in the last 30 days: 1. Listed in the KEV catalogue: 0.

Filter vulnerabilities
Clear filters

Vulnerabilities: 9

  1. CVE-2026-82531

    Critical · CVSS 9.2EPSS 0.82%Public exploitNo fix published

    Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache

    Smarty before 4.5.8 and 5.x before 5.8.5 contains a code injection vulnerability where the top-level nocache_hash is never restored during extends:/multi-component template inheritance, leaving it null. Attackers can supply assigned data containing a forged SmartyNocache marker that is copied verbatim into the regenerated PHP cache file, executing arbitrary PHP on include for remote code execution.

    Published Updated
  2. CVE-2026-62993

    Medium · CVSS 6.9EPSS 0.57%No fix published

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

    Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to 4.5.7 and 5.8.2, depending on the release line, Smarty's {fetch} handling in libs/plugins/function.fetch.php and src/FunctionHandler/Fetch.php used Security::isTrustedUri() to validate only the initial remote URL against trusted_uri when a security policy was active. For resources handled by file_get_contents(), including HTTPS URLs, PHP followed HTTP redirects by default. An attacker who could supply or influence a fetch target and had an open redirect on a trusted host could redirect the request to an attacker-chosen

    Published Updated
  3. CVE-2026-62992

    Medium · CVSS 6.9EPSS 0.53%No fix published

    Smarty: Symlink path traversal out of trusted directories

    Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to 5.8.2 (and 4.5.7 on the 4.x line), Security::_checkDir() does not fully resolve symbolic links before validating that a requested path lies within a configured secure directory. An attacker able to place or reference a symlink within a directory Smarty treats as trusted (e.g., a template or config directory) could use it to point outside the intended secure directory, bypassing the containment check and reading arbitrary files accessible to the PHP process. This issue is fixed in versions 5.8.2 and 4.5.7.

    Published Updated
  4. CVE-2024-35226

    High · CVSS 7.3EPSS 0.51%Fix available

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

    Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. In affected versions template authors could inject php code by choosing a malicious file name for an extends-tag. Sites that cannot fully trust template authors should update asap. All users are advised to update. There is no patch for users on the v3 branch. There are no known workarounds for this vulnerability.

    • Update to 4.5.4-1
    Published Updated
  5. CVE-2023-28447

    High · CVSS 7.1EPSS 1.02%Fix available

    Cross site scripting vulnerability in Javascript escaping in smarty/smarty

    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.

    • Update to 4.3.1-1
    Published Updated
  6. CVE-2022-29221

    High · CVSS 8.8EPSS 4.91%Fix available

    PHP Code Injection by malicious block or filename in Smarty

    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.

    • Update to 4.1.1-1
    Published Updated
  7. CVE-2021-29454

    High · CVSS 8.1EPSS 1.8%Fix available

    Sandbox Escape by math function in smarty

    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.

    • Update to 4.1.1-1
    Published Updated
  8. CVE-2021-21408

    High · CVSS 8.8EPSS 2.08%Fix available

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

    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.

    • Update to 4.1.1-1
    Published Updated

Check your server

Check your installed stack and versions against the current vulnerability feeds.

Check your server →