PyPI: pillow

CVE-2023-50447

Safety vulnerability ID: SFTY-20240119-01887

Safety legacy ID: pyup.io-64436

Pillow is affected by an arbitrary code execution vulnerability. If an attacker has control over the keys passed to the environment argument of PIL.ImageMath.eval(), they may be able to execute arbitrary code. https://pillow.readthedocs.io/en/stable/releasenotes/10.2.0.html

Created at: Nov 6, 2025Updated at: Nov 6, 2025

Overview

Arbitrary Code Execution in Pillow

Advisory

Pillow is affected by an arbitrary code execution vulnerability. If an attacker has control over the keys passed to the environment argument of PIL.ImageMath.eval(), they may be able to execute arbitrary code. https://pillow.readthedocs.io/en/stable/releasenotes/10.2.0.html

Affected Package

Affecting pillow package, versions
<10.2.0

Also affects

---

How to Fix

Upgrade
pillow
to
10.2.0
or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more