CVE-2022-48560: Use After Free

Published Aug 22, 2023
·
Updated

A use-after-free exists in Python through 3.9 via heappushpop in heapq.

Other sources

A use-after-free exists in Python via heappushpop in heapq module.

https://bugs.python.org/issue39421 https://github.com/python/cpython/issues/83602 https://github.com/python/cpython/commit/79f89e6e5a659846d1068e8b1bd8e491ccdef861 (v3.9.0a3) https://github.com/python/cpython/commit/993811ffe75c2573f97fb3fd1414b34609b8c8db (v3.8.2rc1) https://github.com/python/cpython/commit/958064f8d2b84062b0582bbae911df8ccfc11fd6 (v3.7.7rc1) https://github.com/python/cpython/commit/c563f409ea30bcb0623d785428c9257917371b76 (v3.6.11rc1)

— Red Hat

Python is vulnerable to a denial of service, caused by a use-after-free flaw in the heappushpop() function in the heapq module. By sending a specially crafted request, a local attacker could exploit this vulnerability to cause a denial of service condition.

— IBM

Affected Software

15 affected componentsFixes available
redhat/python<3.9.0
3.9.0
redhat/python<3.8.2
3.8.2
redhat/python<3.7.7
3.7.7
redhat/python<3.6.11
3.6.11
IBM Security QRadar EDR<=3.12
Python Python<3.6.11
Python Python>=3.7.0<3.7.7
Python Python>=3.8.0<3.8.2
Python Python=3.9.0-alpha1
Python Python=3.9.0-alpha2
Debian Debian Linux=10.0
debian/python2.7<2.7.18-8+deb11u1
2.7.18-8+deb11u1
debian/python2.7
2.7.16-2+deb10u32.7.18-8+deb11u1
debian/python3.7
3.7.3-2+deb10u63.7.7-1
debian/python3.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/python to a version that resolves this vulnerability.

    Fixed in 3.9.0
  2. Upgrade

    Upgrade redhat/python to a version that resolves this vulnerability.

    Fixed in 3.8.2
  3. Upgrade

    Upgrade redhat/python to a version that resolves this vulnerability.

    Fixed in 3.7.7
  4. Upgrade

    Upgrade redhat/python to a version that resolves this vulnerability.

    Fixed in 3.6.11
  5. Upgrade

    Upgrade debian/python2.7 to a version that resolves this vulnerability.

    Fixed in 2.7.18-8+deb11u1
  6. Upgrade

    Upgrade debian/python2.7 to a version that resolves this vulnerability.

    Fixed in 2.7.16-2+deb10u3Fixed in 2.7.18-8+deb11u1
  7. Upgrade

    Upgrade debian/python3.7 to a version that resolves this vulnerability.

    Fixed in 3.7.3-2+deb10u6Fixed in 3.7.7-1
  8. Upgrade

    Upgrade Python to a version that resolves this vulnerability.

    Fixed in 3.9.0a3
  9. Upgrade

    Upgrade Python to a version that resolves this vulnerability.

    Fixed in 3.8.2rc1
  10. Upgrade

    Upgrade Python to a version that resolves this vulnerability.

    Fixed in 3.7.7rc1
  11. Upgrade

    Upgrade Python to a version that resolves this vulnerability.

    Fixed in 3.6.11rc1

Event History

Aug 22, 2023
CVE Published
via MITRE·12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityAffected Software
Data Sourced
via OSV·12:00 AM
Description
Updated
via Ubuntu·12:00 AM
Affected Software
Updated
via Ubuntu·12:00 AM
DescriptionAffected Software
Updated
via Ubuntu·12:00 AM
Description
Aug 26, 2023
Data Sourced
02:16 AM
Weakness
Nov 15, 2023
Data Sourced
via Red Hat·07:40 AM
DescriptionSeverityAffected Software
Dec 8, 2023
Updated
03:15 AM
Affected Software
May 9, 2024
Data Sourced
via IBM·12:00 AM
DescriptionSeverityAffected Software
Jul 31, 2024
Data Sourced
via MITRE·08:13 PM
Description
Nov 21, 2024
Updated
via NVD·07:33 AM
RemedyAffected Software
Mar 14, 2025
Updated
via IBM·12:00 AM
Affected Software
Oct 14, 2026
Data Sourced
via NVD·07:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Updated
via NVD·07:16 PM
RemedyAffected Software
Oct 21, 2026
Data Sourced
via Microsoft·08:07 AM
DescriptionSeverityWeakness
Nov 2, 2026
Updated
via NVD·11:17 PM
Affected Software
Nov 24, 2026
Withdrawn
via OSV·04:29 AM
Data Sourced
via OSV·04:29 AM
SeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is CVE-2022-48560?

CVE-2022-48560 is a use-after-free vulnerability in Python through version 3.9.

2

How does the use-after-free vulnerability in Python CVE-2022-48560 occur?

The use-after-free vulnerability in Python CVE-2022-48560 occurs through the heappushpop function in the heapq module.

3

Which versions of Python are affected by CVE-2022-48560?

Python versions 3.7 to 3.9 are affected by CVE-2022-48560.

4

What is the severity of CVE-2022-48560?

CVE-2022-48560 has a severity rating of 7.5 (high).

5

How can I fix the use-after-free vulnerability in Python CVE-2022-48560?

To fix the use-after-free vulnerability in Python CVE-2022-48560, update to a version of Python that is not affected by the vulnerability.

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