# CVE-2022-29221: smarty3: Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic

CVE-2022-29221 is fixed in 3 products on 1 platform, first by smarty3 3.1.39-2ubuntu1.22.04.1, released May 24, 2022. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2022-29221
- Priority: High
- CVSS: 8.8 (Medium)
- EPSS: 0.0491
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: May 24, 2022

## Description

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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | postfixadmin Ubuntu 18.04.6 LTS (bionic) | 3.0.2-2ubuntu0.1~esm1 | [postfixadmin 3.0.2-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-postfixadmin-3.0.2-2ubuntu0.1-esm1.md) | Mar 28, 2023 |
| Linux | postfixadmin Ubuntu 20.04 LTS (focal) | 3.2.1-3ubuntu0.1~esm1 | [postfixadmin 3.2.1-3ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-postfixadmin-3.2.1-3ubuntu0.1-esm1.md) | Mar 28, 2023 |
| Linux | postfixadmin Ubuntu 22.04.1 LTS (jammy) | 3.3.10-2ubuntu0.1~esm1 | [postfixadmin 3.3.10-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-postfixadmin-3.3.10-2ubuntu0.1-esm1.md) | Mar 28, 2023 |
| Linux | smarty3 Debian 12.15 (bookworm) | 3.1.45-1 | [DEBIAN-CVE-2022-29221](https://patchblox.com/security/data/fix/linux/debian-cve-2022-29221.md) | May 24, 2022 |
| Linux | smarty3 Debian 13.5 (trixie) | 3.1.45-1 | [DEBIAN-CVE-2022-29221](https://patchblox.com/security/data/fix/linux/debian-cve-2022-29221.md) | May 24, 2022 |
| Linux | smarty3 Debian 14 | 3.1.45-1 | [DEBIAN-CVE-2022-29221](https://patchblox.com/security/data/fix/linux/debian-cve-2022-29221.md) | May 24, 2022 |
| Linux | smarty3 Ubuntu 22.04.1 LTS (jammy) | 3.1.39-2ubuntu1.22.04.1 | [smarty3 3.1.39-2ubuntu1.22.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-smarty3-3.1.39-2ubuntu1.22.04.1.md) | May 24, 2022 |
| Linux | smarty3 Ubuntu 24.10 (oracular) | 3.1.39-2ubuntu2 | [smarty3 3.1.39-2ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-oracular-smarty3-3.1.39-2ubuntu2.md) | Jan 16, 2026 |
| Linux | smarty3 Ubuntu 25.04 (plucky) | 3.1.39-2ubuntu2 | [smarty3 3.1.39-2ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-plucky-smarty3-3.1.39-2ubuntu2.md) | Jan 16, 2026 |
| Linux | smarty4 Debian 12.15 (bookworm) | 4.1.1-1 | [DEBIAN-CVE-2022-29221](https://patchblox.com/security/data/fix/linux/debian-cve-2022-29221.md) | May 24, 2022 |
| Linux | smarty4 Debian 13.5 (trixie) | 4.1.1-1 | [DEBIAN-CVE-2022-29221](https://patchblox.com/security/data/fix/linux/debian-cve-2022-29221.md) | May 24, 2022 |
| Linux | smarty4 Debian 14 | 4.1.1-1 | [DEBIAN-CVE-2022-29221](https://patchblox.com/security/data/fix/linux/debian-cve-2022-29221.md) | May 24, 2022 |

---

Data as of 2026-11-08T19:12:23Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
