CVE-2023-50447: Arbitrary Code Execution in Pillow

Published Jan 19, 2024
·
Updated

Pillow could allow a remote attacker to execute arbitrary code on the system, caused by improper neutralization of user supplied-input by the PIL.ImageMath.eval function. By sending a specially crafted request using keys that leverage the environment parameter, an attacker could exploit this vulnerability to execute arbitrary code on the system.

Other sources

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).

— Ubuntu

Affected Software

24 affected componentsFixes available
ubuntu/pillow<7.0.0-4ubuntu0.8
7.0.0-4ubuntu0.8
ubuntu/pillow<9.0.1-1ubuntu0.2
9.0.1-1ubuntu0.2
ubuntu/pillow<10.0.0-1ubuntu0.1
10.0.0-1ubuntu0.1
ubuntu/pillow<10.2.0-1
10.2.0-1
pip/pillow<10.2.0
10.2.0
IBM Cognos Analytics<=12.0.0-12.0.3
IBM Cognos Analytics<=11.2.0-11.2.4 FP4
Python Pillow<=10.1.0
Debian Debian Linux=10.0
alpine/py3-pillow<10.2.0-r0
10.2.0-r0
alpine/py3-pillow<10.2.0-r0
10.2.0-r0
alpine/py3-pillow<10.2.0-r0
10.2.0-r0
alpine/py3-pillow<10.2.0-r0
10.2.0-r0
alpine/py3-pillow<10.2.0-r0
10.2.0-r0
alpine/py3-pillow<10.2.0-r0
10.2.0-r0
pip/pillow<10.2.0
10.2.0
debian/pillow
5.4.1-2+deb10u48.1.2+dfsg-0.3+deb11u29.4.0-1.1+deb12u110.2.0-1
ubuntu/pillow<2.3.0-1ubuntu3.4+esm5
2.3.0-1ubuntu3.4+esm5
ubuntu/pillow<3.1.2-0ubuntu1.6+esm3
3.1.2-0ubuntu1.6+esm3
ubuntu/pillow<5.1.0-1ubuntu0.8+esm2
5.1.0-1ubuntu0.8+esm2
ubuntu/pillow<7.0.0-4ubuntu0.8
7.0.0-4ubuntu0.8
ubuntu/pillow-python2*
ubuntu/pillow<9.0.1-1ubuntu0.2
9.0.1-1ubuntu0.2
ubuntu/pillow<10.2.0-1
10.2.0-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade ubuntu/pillow to a version that resolves this vulnerability.

    Fixed in 7.0.0-4ubuntu0.8
  2. Upgrade

    Upgrade ubuntu/pillow to a version that resolves this vulnerability.

    Fixed in 9.0.1-1ubuntu0.2
  3. Upgrade

    Upgrade ubuntu/pillow to a version that resolves this vulnerability.

    Fixed in 10.0.0-1ubuntu0.1
  4. Upgrade

    Upgrade ubuntu/pillow to a version that resolves this vulnerability.

    Fixed in 10.2.0-1
  5. Upgrade

    Upgrade pip/Pillow to a version that resolves this vulnerability.

    Fixed in 10.2.0
  6. Upgrade

    Upgrade alpine/py3-pillow to a version that resolves this vulnerability.

    Fixed in 10.2.0-r0
  7. Upgrade

    Upgrade pip/pillow to a version that resolves this vulnerability.

    Fixed in 10.2.0
  8. Upgrade

    Upgrade debian/pillow to a version that resolves this vulnerability.

    Fixed in 5.4.1-2+deb10u4Fixed in 8.1.2+dfsg-0.3+deb11u2Fixed in 9.4.0-1.1+deb12u1Fixed in 10.2.0-1
  9. Upgrade

    Upgrade ubuntu/pillow to a version that resolves this vulnerability.

    Fixed in 2.3.0-1ubuntu3.4+esm5
  10. Upgrade

    Upgrade ubuntu/pillow to a version that resolves this vulnerability.

    Fixed in 3.1.2-0ubuntu1.6+esm3
  11. Upgrade

    Upgrade ubuntu/pillow to a version that resolves this vulnerability.

    Fixed in 5.1.0-1ubuntu0.8+esm2
  12. Upgrade

    Upgrade Pillow to a version that resolves this vulnerability.

    Fixed in 10.2.0

Event History

Jan 19, 2024
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Data Sourced
via OSV·08:15 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·08:15 PM
Description
Advisory Published
via GitHub·09:30 PM
Data Sourced
via GitHub·09:30 PM
DescriptionWeaknessAffected Software
Data Sourced
via OSV·09:30 PM
Weakness
Event
via OSV·09:30 PM
Jan 22, 2024
Data Sourced
via Red Hat·05:17 AM
DescriptionSeverityAffected Software
Advisory Published
via GitHub·09:28 PM
Jan 26, 2024
Data Sourced
via NVD·01:50 PM
SeverityWeaknessAffected Software
Data Sourced
via GitHub·08:28 PM
Severity
Jan 29, 2024
Updated
via NVD·09:15 PM
Affected Software
Feb 15, 2024
Updated
via NVD·03:18 AM
Affected Software
Mar 27, 2024
Updated
via NVD·09:15 PM
Affected Software
Aug 1, 2024
Updated
via NVD·01:45 PM
SeverityWeaknessAffected Software
Aug 2, 2024
Updated
via GitHub·10:37 AM
Weakness
Dec 17, 2024
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
Jun 17, 2026
Updated
via NVD·06:39 AM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2023-50447?

CVE-2023-50447 is considered a critical vulnerability that allows arbitrary code execution on affected systems.

2

How do I fix CVE-2023-50447?

To fix CVE-2023-50447, update Pillow to version 10.2.0 or later, or apply the appropriate patch for affected software such as IBM Cognos Analytics.

3

Which versions of Pillow are affected by CVE-2023-50447?

CVE-2023-50447 affects multiple versions of Pillow, specifically those prior to 10.2.0.

4

Is my version of Pillow vulnerable to CVE-2023-50447?

You are vulnerable to CVE-2023-50447 if you are using Pillow versions below 10.2.0.

5

What types of software are impacted by CVE-2023-50447?

CVE-2023-50447 impacts Pillow installations across various environments, including Ubuntu, Debian, and products like IBM Cognos Analytics.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203