CVE-2022-24303: Path Traversal

Published Feb 9, 2022
·
Updated

If the path to the temporary directory on Linux or macOS contained a space, this would break removal of the temporary image file after im.show() (and related actions), and potentially remove an unrelated file. This been present since PIL.

Reference: https://pillow.readthedocs.io/en/stable/releasenotes/9.0.1.html

Other sources

Pillow before 9.0.1 allows attackers to delete files because spaces in temporary pathnames are mishandled.

— MITRE

Affected Software

18 affected componentsFixes available
pip/pillow<9.0.1
9.0.1
Python Pillow<9.0.1
Fedoraproject Fedora=34
Fedoraproject Fedora=35
alpine/py3-pillow<8.4.0-r3
8.4.0-r3
alpine/py3-pillow<9.0.1-r0
9.0.1-r0
alpine/py3-pillow<9.0.1-r0
9.0.1-r0
alpine/py3-pillow<9.0.1-r0
9.0.1-r0
alpine/py3-pillow<9.0.1-r0
9.0.1-r0
alpine/py3-pillow<9.0.1-r0
9.0.1-r0
alpine/py3-pillow<9.0.1-r0
9.0.1-r0
alpine/py3-pillow<9.0.1-r0
9.0.1-r0
alpine/py3-pillow<9.0.1-r0
9.0.1-r0
alpine/py3-pillow<9.0.1-r0
9.0.1-r0
debian/pillow<9.0.1-1
9.0.1-1
debian/pillow<9.0.1-1
9.0.1-1
debian/pillow<9.0.1-1
9.0.1-1
debian/pillow
8.1.2+dfsg-0.3+deb11u39.0.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 9.0.1
  2. Upgrade

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

    Fixed in 8.4.0-r3
  3. Upgrade

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

    Fixed in 9.0.1-r0
  4. Upgrade

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

    Fixed in 9.0.1-1
  5. Upgrade

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

    Fixed in 8.1.2+dfsg-0.3+deb11u3Fixed in 9.0.1-1
  6. Upgrade

    Upgrade Pillow to a version that resolves this vulnerability.

    Fixed in 9.0.1

Event History

Feb 9, 2022
Data Sourced
via Red Hat·07:06 PM
DescriptionSeverityAffected Software
Mar 11, 2022
Advisory Published
11:10 PM
Data Sourced
11:10 PM
DescriptionSeverityAffected Software
Mar 28, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via OSV·02:15 AM
DescriptionAffected Software
Nov 7, 2023
Data Sourced
via NVD·03:44 AM
DescriptionSeverityAffected Software
Updated
via NVD·03:44 AM
Affected Software
Apr 3, 2024
Advisory Published
via GitHub·07:56 PM
Data Sourced
via GitHub·07:56 PM
DescriptionSeverityAffected Software
Oct 11, 2024
Data Sourced
via GitHub·09:01 PM
Weakness
Jun 17, 2026
Updated
via NVD·04:31 AM
Affected Software
Nov 3, 2026
Data Sourced
via OSV·08:01 AM
Severity

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is CVE-2022-24303?

CVE-2022-24303 is a vulnerability in Pillow before version 9.0.1 that allows attackers to delete files due to mishandling of spaces in temporary pathnames.

2

What is the severity of CVE-2022-24303?

CVE-2022-24303 has a severity rating of 9.1, which is considered critical.

3

How does CVE-2022-24303 affect Pillow?

CVE-2022-24303 affects Pillow versions up to but excluding version 9.0.1.

4

How can I fix CVE-2022-24303?

To fix CVE-2022-24303, you should update Pillow to version 9.0.1 or later, which contains the necessary remedy for this vulnerability.

5

Where can I find more information about CVE-2022-24303?

You can find more information about CVE-2022-24303 in the National Vulnerability Database (NVD) at https://nvd.nist.gov/vuln/detail/CVE-2022-24303. Additionally, you can refer to the GitHub commit at https://github.com/python-pillow/Pillow/commit/427221ef5f19157001bf8b1ad7cfe0b905ca8c26 and the release notes at https://pillow.readthedocs.io/en/stable/releasenotes/9.0.1.html#security.

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