Skip to main content
← All vulnerabilities
CVE-2022-29221GHSA-634X-PC3Q-CF4C

PHP Code Injection by malicious block or filename in Smarty

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.1.45, 4.1.1
1 proof of concept on GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: total

  3. Record last updated

Affected versions

  • smarty-php smarty

    fixed in 3.1.45; From 4.0.0 · fixed in 4.1.1

  • smarty/smartyPackagist

    fixed in 3.1.45

  • smarty/smartyPackagist

    From 4.0.0 · fixed in 4.1.1

References 10

GitHub · smarty-php/smarty

lists.debian.org

debian.org

security.gentoo.org

lists.fedoraproject.org

GitHub · sbani/CVE-2022-29221-PoC