Is smarty/smarty 4.2 vulnerable?

Composer · 2 releases from 4.2.0 to 4.2.1 · latest smarty/smarty is 5.8.5 · checked 1 Nov 2026

Yes: 4 known advisories

Yes. smarty/smarty 4.2.1, the last 4.2 release, is affected by 4 known security advisories (2 high, 2 medium), including CVE-2024-35226, CVE-2023-28447, CVE-2026-62993. 1 more affects earlier 4.2.x releases. Upgrade to 4.5.7 or later to fix all of them.

Upgrade with:composer require smarty/smarty:^4.5.7

Is your project affected?

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

Advisories affecting smarty/smarty 4.2.1

  • 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-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

Fixed within 4.2.x, affecting earlier releases

  • 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

Which of your client projects are still on smarty/smarty 4.2?

NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact smarty/smarty version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.

Other smarty/smarty versions

Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the Composer registry. Refreshed daily.