| 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, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, 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 |
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| smarty3 (PTS) | bullseye | 3.1.39-2+deb11u1 | fixed |
| bullseye (security) | 3.1.39-2+deb11u2 | fixed | |
| bookworm, bookworm (security) | 3.1.47-2+deb12u1 | fixed | |
| forky, sid, trixie | 3.1.48-2 | fixed | |
| smarty4 (PTS) | bookworm, bookworm (security) | 4.3.0-1+deb12u2 | fixed |
| forky, sid, trixie | 4.5.5-1 | fixed |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| smarty | source | (unstable) | (unfixed) | |||
| smarty3 | source | stretch | 3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u6 | DLA-3033-1 | ||
| smarty3 | source | buster | 3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1 | DSA-5151-1 | ||
| smarty3 | source | bullseye | 3.1.39-2+deb11u1 | DSA-5151-1 | ||
| smarty3 | source | (unstable) | 3.1.45-1 | 1011758 | ||
| smarty4 | source | (unstable) | 4.1.1-1 | 1011757 |
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)