GitHub Advisoryadvisory · PyPI

GHSA-8vj2-vxx3-667w Arbitrary expression injection in Pillow

CRITICAL Published 2022-01-12 Modified 2024-10-11 Official page ↗
Aliases
CVE-2022-22817
Ecosystem
PyPI
Packages
pillow
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-74
Reviewed
2022-01-11

Affected packages

• PyPI pillow: < 9.0.1 → fixed in 9.0.1

Description

`PIL.ImageMath.eval` in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python exec method `ImageMath.eval("exec(exit())")`. While Pillow 9.0.0 restricted top-level builtins available to PIL.ImageMath.eval(), it did not prevent builtins available to lambda expressions. These are now also restricted in 9.0.1.

Related

Alias · CVE (1)

  • CVE-2022-22817 PIL.ImageMath.eval in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python exec method. vulnerability

Weakness · CWE (1)

  • CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component weakness

References