CVE-2022-22817

NameCVE-2022-22817
DescriptionPIL.ImageMath.eval in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python exec method. A lambda expression could also be used.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-2893-1, DLA-3768-1, DSA-5053-1, ELA-1059-1, ELA-546-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
pillow (PTS)jessie, jessie (lts)2.6.1-2+deb8u10fixed
stretch (security)4.0.0-4+deb9u4vulnerable
stretch (lts), stretch4.0.0-4+deb9u6fixed
buster (security), buster, buster (lts)5.4.1-2+deb10u6fixed
bullseye (security), bullseye8.1.2+dfsg-0.3+deb11u2fixed
bookworm (security), bookworm9.4.0-1.1+deb12u1fixed
sid, trixie10.4.0-1fixed

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

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
pillowsourcejessie2.6.1-2+deb8u9ELA-1059-1
pillowsourcestretch4.0.0-4+deb9u5ELA-1059-1
pillowsourcebuster5.4.1-2+deb10u5DLA-3768-1
pillowsourcebullseye8.1.2+dfsg-0.3+deb11u1DSA-5053-1
pillowsource(unstable)9.0.0-1

Notes

https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#restrict-builtins-available-to-imagemath-eval
https://github.com/python-pillow/Pillow/commit/8531b01d6cdf0b70f256f93092caa2a5d91afc11 (9.0.0)
Fillowup in 9.0.1: https://github.com/python-pillow/Pillow/commit/c930be0758ac02cf15a2b8d5409d50d443550581

Search for package or bug name: Reporting problems