ADVISORIES

Vulnerability

CVE-2021-29454

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.

8 advisories report this vulnerability, across 3 ecosystems.

High severity All Ubuntu 4Debian 3Packagist 1

Advisories

  • DEBIAN-CVE-2021-29454

    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…

    CVE-2021-29454 Debian Updated 23 October 2026
  • DLA-2995-1

    smarty3 - security update

    CVE-2021-21408CVE-2021-29454 Debian Updated 20 November 2026
  • DSA-5151-1

    smarty3 - security update

    CVE-2021-21408CVE-2021-29454CVE-2022-29221 Debian Updated 20 November 2026
  • GHSA-29gp-2c3m-3j6m

    Sandbox Escape by math function in smarty

    High CVE-2021-29454 Packagist Updated 8 July 2026
  • UBUNTU-CVE-2021-29454

    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…

    CVE-2021-29454 Ubuntu Updated 4 February 2026
  • USN-5348-1

    smarty3 vulnerabilities

    CVE-2018-13982CVE-2018-16831CVE-2021-21408CVE-2021-26119 Ubuntu Updated 10 February 2026
  • USN-5348-2

    smarty3 vulnerabilities

    CVE-2021-21408CVE-2021-26119CVE-2021-26120CVE-2021-29454 Ubuntu Updated 25 June 2026
  • USN-5348-3

    smarty3 vulnerabilities

    CVE-2021-21408CVE-2021-26119CVE-2021-26120CVE-2021-29454 Ubuntu Updated 10 February 2026

References