CVE-2022-29221 PHP Code Injection by malicious block or filename in Smarty
HighCVSS 8.8
EPSS 4.9%
PoC
- Published
- Updated
- Exploit status
- Proof-of-concept only
- CISA SSVC
- No known exploitation · automatable: no · technical impact: total
- Technology
- PHPUbuntuDebian
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.
Upgrade path
29 packages: 13 fixed, 13 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/collabtive(Ubuntu 16.04) | = 2.0+dfsg-6; = 2.0+dfsg-6ubuntu1; = 2.0+dfsg-6ubuntu1.1; All versions | No fix listed | No fix yet |
| ubuntu/galette(Ubuntu 16.04) | = 0.8+dfsg-1; = 0.8+dfsg-1ubuntu1; All versions | No fix listed | No fix yet |
| ubuntu/gosa(Ubuntu 16.04) | = 2.7.4+reloaded2-2; = 2.7.4+reloaded2-5; = 2.7.4+reloaded2-6; = 2.7.4+reloaded2-7 +5 more | No fix listed | No fix yet |
| ubuntu/gosa(Ubuntu 18.04) | = 2.7.4+reloaded2-13ubuntu1; = 2.7.4+reloaded3-2ubuntu1; = 2.7.4+reloaded3-3; All versions | No fix listed | No fix yet |
| ubuntu/gosa(Ubuntu 20.04) | = 2.7.4+reloaded3-10; = 2.7.4+reloaded3-10ubuntu1; = 2.7.4+reloaded3-11; All versions | No fix listed | No fix yet |
| ubuntu/gosa(Ubuntu 22.04) | = 2.7.4+reloaded3-16build1; All versions | No fix listed | No fix yet |
| ubuntu/gosa(Ubuntu 24.04) | = 2.8~git20230203.10abe45+dfsg-8; = 2.8~git20230203.10abe45+dfsg-9; = 2.8~git20230203.10abe45+dfsg-10; = 2.8~git20230203.10abe45+dfsg-11 +1 more | No fix listed | No fix yet |
| ubuntu/gosa(Ubuntu 25.10) | = 2.8~git20230203.10abe45+dfsg-18; = 2.8~git20230203.10abe45+dfsg-19; All versions | No fix listed | No fix yet |
| ubuntu/gosa(Ubuntu 26.04) | = 2.8~git20230203.10abe45+dfsg-19; All versions | No fix listed | No fix yet |
| ubuntu/gosa(Ubuntu 26.10) | = 2.8~git20230203.10abe45+dfsg-19; All versions | No fix listed | No fix yet |
| ubuntu/smarty3(Ubuntu Pro 16.04) | = 3.1.21-1; = 3.1.21-1ubuntu1; = 3.1.21-1ubuntu1+esm1; = 3.1.21-1ubuntu1+esm2 +1 more | No fix listed | No fix yet |
| ubuntu/smarty3(Ubuntu Pro 18.04) | = 3.1.31+20161214.1.c7d42e4+selfpack1-2; = 3.1.31+20161214.1.c7d42e4+selfpack1-3; = 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1; = 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1 +1 more | No fix listed | No fix yet |
| ubuntu/smarty3(Ubuntu Pro 20.04) | = 3.1.33+20180830.1.3a78a21f+selfpack1-1; = 3.1.34+20190228.1.c9f0de05+selfpack1-1; = 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1; = 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1+esm1 +2 more | No fix listed | No fix yet |
| debian/smarty3(Debian 12) | < 3.1.45-1 | 3.1.45-1 | Fixed |
| debian/smarty3(Debian 13) | < 3.1.45-1 | 3.1.45-1 | Fixed |
| debian/smarty3(Debian 14) | < 3.1.45-1 | 3.1.45-1 | Fixed |
| debian/smarty4(Debian 12) | < 4.1.1-1 | 4.1.1-1 | Fixed |
| debian/smarty4(Debian 13) | < 4.1.1-1 | 4.1.1-1 | Fixed |
| debian/smarty4(Debian 14) | < 4.1.1-1 | 4.1.1-1 | Fixed |
| smarty/smarty | < 3.1.45; >= 4.0.0, < 4.1.1 | 3.1.45, 4.1.1 | Fixed |
| smarty/smarty(Packagist) | < 3.1.45; = v2.6.24; = v2.6.25; = v2.6.26 +47 more | 3.1.45, 4.1.1 | Fixed |
| ubuntu/postfixadmin(Ubuntu 22.04) | < 3.3.10-2ubuntu0.1~esm1 | 3.3.10-2ubuntu0.1~esm1 | Fixed |
| ubuntu/postfixadmin(Ubuntu Pro 18.04) | < 3.0.2-2ubuntu0.1~esm1; = 3.0.2-2 | 3.0.2-2ubuntu0.1~esm1 | Fixed |
| ubuntu/postfixadmin(Ubuntu Pro 20.04) | < 3.2.1-3ubuntu0.1~esm1; = 3.2.1-2; = 3.2.1-3 | 3.2.1-3ubuntu0.1~esm1 | Fixed |
| ubuntu/postfixadmin(Ubuntu Pro 22.04) | < 3.3.10-2ubuntu0.1~esm1; = 3.3.7-1; = 3.3.10-2 | 3.3.10-2ubuntu0.1~esm1 | Fixed |
| ubuntu/smarty3(Ubuntu 22.04) | < 3.1.39-2ubuntu1.22.04.1; = 3.1.39-2; = 3.1.39-2ubuntu1 | 3.1.39-2ubuntu1.22.04.1 | Fixed |
| debian linux | = 9.0; = 10.0; = 11.0 | No fix listed | Versions listed |
| fedoraproject fedora | = 36; = 37 | No fix listed | Versions listed |
| smarty-php smarty | = < 3.1.45; = >= 4.0.0, < 4.1.1 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| smarty/smarty(Packagist) | < 3.1.45 | 3.1.45 |
| smarty/smarty(Packagist) | = v2.6.24 | No fix listed |
| smarty/smarty(Packagist) | = v2.6.25 | No fix listed |
| smarty/smarty(Packagist) | = v2.6.26 | No fix listed |
| smarty/smarty(Packagist) | = v2.6.27 | No fix listed |
| smarty/smarty(Packagist) | = v2.6.28 | No fix listed |
| smarty/smarty(Packagist) | = v2.6.29 | No fix listed |
| smarty/smarty(Packagist) | = v2.6.30 | No fix listed |
| smarty/smarty(Packagist) | = v2.6.31 | No fix listed |
| smarty/smarty(Packagist) | = v2.6.33 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.11 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.12 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.13 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.14 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.15 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.16 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.17 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.18 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.19 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.20 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.21 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.23 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.24 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.25 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.26 | No fix listed |
Show 107 more
| Product | Affected versions | Fixed in |
|---|---|---|
| smarty/smarty(Packagist) | = v3.1.27 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.28 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.29 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.30 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.31 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.32 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.33 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.34 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.35 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.36 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.37 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.37.1 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.38 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.39 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.40 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.41 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.42 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.43 | No fix listed |
| smarty/smarty(Packagist) | = v3.1.44 | No fix listed |
| smarty/smarty(Packagist) | >= 4.0.0, < 4.1.1 | 4.1.1 |
| smarty/smarty(Packagist) | = v4.0.0 | No fix listed |
| smarty/smarty(Packagist) | = v4.0.1 | No fix listed |
| smarty/smarty(Packagist) | = v4.0.2 | No fix listed |
| smarty/smarty(Packagist) | = v4.0.3 | No fix listed |
| smarty/smarty(Packagist) | = v4.0.4 | No fix listed |
| smarty/smarty(Packagist) | = v4.1.0 | No fix listed |
| smarty-php smarty | = < 3.1.45 | No fix listed |
| smarty-php smarty | = >= 4.0.0, < 4.1.1 | No fix listed |
| ubuntu/gosa(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/smarty3(Ubuntu:22.04) | < 3.1.39-2ubuntu1.22.04.1 | 3.1.39-2ubuntu1.22.04.1 |
| ubuntu/postfixadmin(Ubuntu:22.04) | < 3.3.10-2ubuntu0.1~esm1 | 3.3.10-2ubuntu0.1~esm1 |
| smarty/smarty | < 3.1.45 | 3.1.45 |
| smarty/smarty | >= 4.0.0, < 4.1.1 | 4.1.1 |
| debian linux | = 9.0 | No fix listed |
| debian linux | = 10.0 | No fix listed |
| debian linux | = 11.0 | No fix listed |
| fedoraproject fedora | = 36 | No fix listed |
| fedoraproject fedora | = 37 | No fix listed |
| ubuntu/gosa(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/gosa(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/gosa(Ubuntu:26.10) | All versions | No fix listed |
| ubuntu/collabtive(Ubuntu:16.04) | All versions | No fix listed |
| ubuntu/collabtive(Ubuntu:16.04) | = 2.0+dfsg-6 | No fix listed |
| ubuntu/collabtive(Ubuntu:16.04) | = 2.0+dfsg-6ubuntu1 | No fix listed |
| ubuntu/collabtive(Ubuntu:16.04) | = 2.0+dfsg-6ubuntu1.1 | No fix listed |
| ubuntu/galette(Ubuntu:16.04) | All versions | No fix listed |
| ubuntu/galette(Ubuntu:16.04) | = 0.8+dfsg-1 | No fix listed |
| ubuntu/galette(Ubuntu:16.04) | = 0.8+dfsg-1ubuntu1 | No fix listed |
| ubuntu/gosa(Ubuntu:16.04) | All versions | No fix listed |
| ubuntu/gosa(Ubuntu:16.04) | = 2.7.4+reloaded2-2 | No fix listed |
| ubuntu/gosa(Ubuntu:16.04) | = 2.7.4+reloaded2-5 | No fix listed |
| ubuntu/gosa(Ubuntu:16.04) | = 2.7.4+reloaded2-6 | No fix listed |
| ubuntu/gosa(Ubuntu:16.04) | = 2.7.4+reloaded2-7 | No fix listed |
| ubuntu/gosa(Ubuntu:16.04) | = 2.7.4+reloaded2-8 | No fix listed |
| ubuntu/gosa(Ubuntu:16.04) | = 2.7.4+reloaded2-9 | No fix listed |
| ubuntu/gosa(Ubuntu:16.04) | = 2.7.4+reloaded2-9ubuntu1 | No fix listed |
| ubuntu/gosa(Ubuntu:16.04) | = 2.7.4+reloaded2-9ubuntu1.1 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:16.04) | All versions | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:16.04) | = 3.1.21-1 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:16.04) | = 3.1.21-1ubuntu1 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:16.04) | = 3.1.21-1ubuntu1+esm1 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:16.04) | = 3.1.21-1ubuntu1+esm2 | No fix listed |
| ubuntu/gosa(Ubuntu:18.04) | All versions | No fix listed |
| ubuntu/gosa(Ubuntu:18.04) | = 2.7.4+reloaded2-13ubuntu1 | No fix listed |
| ubuntu/gosa(Ubuntu:18.04) | = 2.7.4+reloaded3-2ubuntu1 | No fix listed |
| ubuntu/gosa(Ubuntu:18.04) | = 2.7.4+reloaded3-3 | No fix listed |
| ubuntu/postfixadmin(Ubuntu:Pro:18.04) | < 3.0.2-2ubuntu0.1~esm1 | 3.0.2-2ubuntu0.1~esm1 |
| ubuntu/postfixadmin(Ubuntu:Pro:18.04) | = 3.0.2-2 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:18.04) | All versions | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:18.04) | = 3.1.31+20161214.1.c7d42e4+selfpack1-2 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:18.04) | = 3.1.31+20161214.1.c7d42e4+selfpack1-3 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:18.04) | = 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:18.04) | = 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1 | No fix listed |
| ubuntu/gosa(Ubuntu:20.04) | All versions | No fix listed |
| ubuntu/gosa(Ubuntu:20.04) | = 2.7.4+reloaded3-10 | No fix listed |
| ubuntu/gosa(Ubuntu:20.04) | = 2.7.4+reloaded3-10ubuntu1 | No fix listed |
| ubuntu/gosa(Ubuntu:20.04) | = 2.7.4+reloaded3-11 | No fix listed |
| ubuntu/postfixadmin(Ubuntu:Pro:20.04) | < 3.2.1-3ubuntu0.1~esm1 | 3.2.1-3ubuntu0.1~esm1 |
| ubuntu/postfixadmin(Ubuntu:Pro:20.04) | = 3.2.1-2 | No fix listed |
| ubuntu/postfixadmin(Ubuntu:Pro:20.04) | = 3.2.1-3 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:20.04) | All versions | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:20.04) | = 3.1.33+20180830.1.3a78a21f+selfpack1-1 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:20.04) | = 3.1.34+20190228.1.c9f0de05+selfpack1-1 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:20.04) | = 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1~esm1 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:20.04) | = 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1 | No fix listed |
| ubuntu/smarty3(Ubuntu:Pro:20.04) | = 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1+esm1 | No fix listed |
| ubuntu/gosa(Ubuntu:22.04) | = 2.7.4+reloaded3-16build1 | No fix listed |
| ubuntu/smarty3(Ubuntu:22.04) | = 3.1.39-2 | No fix listed |
| ubuntu/smarty3(Ubuntu:22.04) | = 3.1.39-2ubuntu1 | No fix listed |
| ubuntu/postfixadmin(Ubuntu:Pro:22.04) | < 3.3.10-2ubuntu0.1~esm1 | 3.3.10-2ubuntu0.1~esm1 |
| ubuntu/postfixadmin(Ubuntu:Pro:22.04) | = 3.3.7-1 | No fix listed |
| ubuntu/postfixadmin(Ubuntu:Pro:22.04) | = 3.3.10-2 | No fix listed |
| ubuntu/gosa(Ubuntu:24.04) | = 2.8~git20230203.10abe45+dfsg-8 | No fix listed |
| ubuntu/gosa(Ubuntu:24.04) | = 2.8~git20230203.10abe45+dfsg-9 | No fix listed |
| ubuntu/gosa(Ubuntu:24.04) | = 2.8~git20230203.10abe45+dfsg-10 | No fix listed |
| ubuntu/gosa(Ubuntu:24.04) | = 2.8~git20230203.10abe45+dfsg-11 | No fix listed |
| ubuntu/gosa(Ubuntu:25.10) | All versions | No fix listed |
| ubuntu/gosa(Ubuntu:25.10) | = 2.8~git20230203.10abe45+dfsg-18 | No fix listed |
| ubuntu/gosa(Ubuntu:25.10) | = 2.8~git20230203.10abe45+dfsg-19 | No fix listed |
| ubuntu/gosa(Ubuntu:26.10) | = 2.8~git20230203.10abe45+dfsg-19 | No fix listed |
| ubuntu/gosa(Ubuntu:26.04) | = 2.8~git20230203.10abe45+dfsg-19 | No fix listed |
| debian/smarty3(Debian:12) | < 3.1.45-1 | 3.1.45-1 |
| debian/smarty3(Debian:13) | < 3.1.45-1 | 3.1.45-1 |
| debian/smarty3(Debian:14) | < 3.1.45-1 | 3.1.45-1 |
| debian/smarty4(Debian:12) | < 4.1.1-1 | 4.1.1-1 |
| debian/smarty4(Debian:13) | < 4.1.1-1 | 4.1.1-1 |
| debian/smarty4(Debian:14) | < 4.1.1-1 | 4.1.1-1 |
References
- github.com issue-tracking third-party-advisory vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com issue-tracking patch third-party-advisory
- github.com exploit
- github.com product
- github.com issue-tracking release-notes third-party-advisory
- github.com issue-tracking release-notes third-party-advisory
- [debian-lts-announce] 20220529 [SECURITY] [DLA 3033-1] smarty3 security update mailing-list third-party-advisory
- lists.fedoraproject.org
- lists.fedoraproject.org
- GLSA-202209-09 third-party-advisory vendor-advisory
- DSA-5151 third-party-advisory vendor-advisory
- github.com
- Debian Security Tracker CVE-2022-29221 vendor-advisory
- bugs.debian.org issue-tracking
- bugs.debian.org issue-tracking
- FEDORA-2022-52154efd61 vendor-advisory
- FEDORA-2022-d5fc9dcdd7 vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- USN-6012-1 vendor-advisory
- USN-6550-1 vendor-advisory
- www.cve.org issue-tracking
- github.com issue-tracking