CVE-2023-50447: Arbitrary Code Execution in Pillow
Pillow through 10.1.0 allows PIL.ImageMath.eval Arbitrary Code Execution via the environment parameter, a different vulnerability than CVE-2022-22817 (which was about the expression parameter).
Published Jan 19, 2024 · Updated Nov 18, 2024
Affected packages
Pillow
- Ecosystem
- PyPI
- Affected
- < 10.2.0
- Fixed in
- 10.2.0
- Check
pip show Pillow
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Pillow through 10.1.0 allows PIL.ImageMath.eval Arbitrary Code Execution via the environment parameter, a different vulnerability than CVE-2022-22817 (which was about the expression parameter).
References
- https://nvd.nist.gov/vuln/detail/CVE-2023-50447
- https://github.com/python-pillow/Pillow/commit/45c726fd4daa63236a8f3653530f297dc87b160a
- https://pillow.readthedocs.io/en/stable/releasenotes/10.2.0.html#security
- https://github.com/python-pillow/Pillow/releases
- https://lists.debian.org/debian-lts-announce/2024/01/msg00019.html
- https://devhub.checkmarx.com/cve-details/CVE-2023-50447
- https://duartecsantos.github.io/2023-01-02-CVE-2023-50447
- https://duartecsantos.github.io/2024-01-02-CVE-2023-50447
- https://github.com/advisories/GHSA-3f63-hfp8-52jq
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-96639
Pillow multi-frame loaders can reuse stale native image storage after mode transitions
critical9.8Oct 22, 2026CVE-2026-112393
Pillow: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO
critical9.2Oct 21, 2026CVE-2026-112900
Pillow: Argument Injection in Ghostscript call, potentially leading into RCE
critical9.2Oct 21, 2026CVE-2026-112403
Pillow: Heap buffer overflow in ImagingJpegDecode
critical9.2Oct 20, 2026
