Name | CVE-2022-29221 |
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. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
References | DLA-3033-1, DSA-5151-1 |
Debian Bugs | 1011757, 1011758 |
Vulnerable and fixed packages
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|
smarty3 (PTS) | jessie, jessie (lts) | 3.1.21-1+deb8u2 | vulnerable |
| stretch (security), stretch (lts), stretch | 3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u6 | fixed |
| buster, buster (lts) | 3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u3 | fixed |
| buster (security) | 3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u2 | fixed |
| bullseye | 3.1.39-2+deb11u1 | fixed |
| bullseye (security) | 3.1.39-2+deb11u2 | fixed |
| bookworm | 3.1.47-2 | fixed |
| bookworm (security) | 3.1.47-2+deb12u1 | fixed |
| sid, trixie | 3.1.48-2 | fixed |
smarty4 (PTS) | bookworm | 4.3.0-1+deb12u1 | fixed |
| bookworm (security) | 4.3.0-1+deb12u2 | fixed |
| sid, trixie | 4.5.4-1 | fixed |
The information below is based on the following data on fixed versions.
Notes
https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c
https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccddd (v4.1.1)
https://github.com/smarty-php/smarty/commit/3606c4717ed6348e114a610ff1e446048dcd0345 (v3.1.45)