CVE-2022-29221

NameCVE-2022-29221
DescriptionSmarty 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-3033-1, DSA-5151-1
Debian Bugs1011757, 1011758

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
smarty3 (PTS)jessie, jessie (lts)3.1.21-1+deb8u2vulnerable
stretch (security), stretch (lts), stretch3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u6fixed
buster, buster (lts)3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u3fixed
buster (security)3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u2fixed
bullseye3.1.39-2+deb11u1fixed
bullseye (security)3.1.39-2+deb11u2fixed
bookworm3.1.47-2fixed
bookworm (security)3.1.47-2+deb12u1fixed
sid, trixie3.1.48-2fixed
smarty4 (PTS)bookworm4.3.0-1+deb12u1fixed
bookworm (security)4.3.0-1+deb12u2fixed
sid, trixie4.5.4-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
smartysource(unstable)(unfixed)
smarty3sourcejessie(unfixed)end-of-life
smarty3sourcestretch3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u6DLA-3033-1
smarty3sourcebuster3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1DSA-5151-1
smarty3sourcebullseye3.1.39-2+deb11u1DSA-5151-1
smarty3source(unstable)3.1.45-11011758
smarty4source(unstable)4.1.1-11011757

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)

Search for package or bug name: Reporting problems