Advisory

GHSA-8vj2-vxx3-667w

Also known as: BIT-pillow-2022-22817, CVE-2022-22817, PYSEC-2022-10

Summary

Arbitrary expression injection in Pillow

Details

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2022-01-12 20:07 UTC
Modified
2024-10-14 18:26 UTC

Affected packages and fixes

pillow

PyPI · All systems

Affected

  • introduced 0, fixed 9.0.1 (ecosystem)

Fixed versions

9.0.1

Fix

  • Fixed version 9.0.1
    pip install --upgrade pillow==9.0.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences