cve.bz

CVE-2022-48566 Race Condition

5.9 mediumExploit referenceEPSS 1.3%Fix available

Medium (5.9). EPSS 1.3% estimated probability of exploitation activity in the next 30 days.

On this page
An issue was discovered in compare_digest in Lib/hmac.py in Python through 3.9.1. Constant-time-defeating optimisations were possible in the accumulator variable in hmac.compare_digest.

Severity

CVSS 3.1

5.9 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
1.3% (unchanged from 1.3% a week ago; 1.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 71st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2024-10-03. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization (Race Condition)
OWASP Top 10
A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-48566 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-48566?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-48566?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-48566 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
python:pythonbefore 3.6.13
python:pythonfrom 3.7.0 before 3.7.10
python:pythonfrom 3.8.0 before 3.8.7
python:pythonfrom 3.9.0 before 3.9.1
debian:debian_linux10.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10python2.72.7.16-2+deb10u3DLA-3575-1
Debian10python3.73.7.3-2+deb10u6DLA-3614-1
Debian12, 13, 14pypy37.3.5+dfsg-2DEBIAN-CVE-2022-48566
Ubuntu20.04:LTSpython2.72.7.18-1~20.04.7UBUNTU-CVE-2022-48566 USN-7180-1
Ubuntu20.04:LTSpython3.83.8.10-0ubuntu1~20.04UBUNTU-CVE-2022-48566 USN-6891-1
Ubuntu22.04:LTSpython2.72.7.18-13ubuntu1.5UBUNTU-CVE-2022-48566 USN-7180-1
Ubuntu22.04:LTSpython3.103.10.12-1~22.04.4USN-6891-1
UbuntuPro:14.04:LTSpython2.7, python3.4no fix listedUBUNTU-CVE-2022-48566
UbuntuPro:14.04:LTSpython3.53.5.2-2ubuntu0~16.04.4~14.04.1+esm1UBUNTU-CVE-2022-48566 USN-6891-1
UbuntuPro:16.04:LTSpython2.72.7.12-1ubuntu0~16.04.18+esm7UBUNTU-CVE-2022-48566 USN-6400-1
UbuntuPro:16.04:LTSpython3.53.5.2-2ubuntu0~16.04.13+esm11UBUNTU-CVE-2022-48566 USN-6400-1 USN-6891-1
UbuntuPro:18.04:LTSpython2.72.7.17-1~18.04ubuntu1.13+esm2UBUNTU-CVE-2022-48566 USN-6400-1
UbuntuPro:18.04:LTSpython3.63.6.9-1~18.04ubuntu1.13+esm2UBUNTU-CVE-2022-48566 USN-6891-1
UbuntuPro:18.04:LTSpython3.73.7.5-2ubuntu1~18.04.2+esm3UBUNTU-CVE-2022-48566 USN-6891-1
UbuntuPro:18.04:LTSpython3.83.8.0-3ubuntu1~18.04.2+esm2UBUNTU-CVE-2022-48566 USN-6891-1
2 more for Ubuntu in the JSON and on Ubuntu's page.
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 12 morepython3, python3-core3.6.15-150300.10.57.1SUSE-SU-2024:0901-1
SUSELinux Enterprise Micro 5.1python3, python3-core3.6.15-150000.3.138.1SUSE-SU-2024:0464-1
SUSELinux Enterprise Module for Development Tools 15 SP5python3-core3.6.15-150300.10.57.1SUSE-SU-2024:0901-1
SUSELinux Enterprise Module for Package Hub 15 SP4python-base2.7.18-150000.57.1SUSE-SU-2023:4220-1
SUSELinux Enterprise Module for Package Hub 15 SP5, Manager Proxy 4.2, Manager Server 4.2python, python-base2.7.18-150000.57.1SUSE-SU-2023:4220-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5python, python-doc, python-base2.7.18-33.26.1SUSE-SU-2023:4001-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5python36, python36-core3.6.15-55.1SUSE-SU-2024:1847-1
SUSELinux Enterprise Software Development Kit 12 SP5python36-core3.6.15-55.1SUSE-SU-2024:1847-1
SUSELinux Enterprise Workstation Extension 12 SP5python-base2.7.18-33.26.1SUSE-SU-2023:4001-1
openSUSELeap 15.4, Leap 15.5python, python-doc, python-base2.7.18-150000.57.1SUSE-SU-2023:4220-1
openSUSELeap 15.5python3, python3-core, python3-documentation3.6.15-150300.10.57.1SUSE-SU-2024:0901-1
openSUSELeap Micro 5.3, Leap Micro 5.4python3, python3-core3.6.15-150300.10.57.1SUSE-SU-2024:0901-1
openSUSETumbleweedpython2.7.18-39.1openSUSE-SU-2024:13253-1
Azure Linux3python-pyno fix listedAZL-109656

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This flaw is classified as Moderate as in contrast to an Important rating, the exploitation of this vulnerability is difficult to achieve and the outcome of the impact is breach of confidentiality.

Versions of `python36:3.6/python36` as shipped with Red Hat Enterprise Linux 8 are marked as 'Not affected' as they just provide "symlinks" to the main `python3` component, which provides the interpreter of the Python programming language.

Versions of `python39:3.9/python39` and `python2` in various modules as shipped with Red Hat Enterprise Linux 8, `python3.11/python3.9` as shipped with Red Hat Enterprise Linux 9 and `python 3.8.14` as shipped with Red Hat Software Collections are marked as 'Not affected' as they are higher than the vulnerable version, thereby containing the fixed code.

Red Hat's mitigation

As per upstream, either make the accumulator variable result a volatile unsigned char instead of unsigned char or use instead use CRYPTO_memcmp from OpenSSL/BoringSSL when SSL is available as SSL libraries are more secure when it comes to timing based vulnerabilities.

https://github.com/python/cpython/issues/84968

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6pythonOut of support scope
Red Hat Enterprise Linux 7pythonOut of support scope
Red Hat Enterprise Linux 7python3Out of support scope
Red Hat Enterprise Linux 8gimp:flatpak/python2Not affected
Red Hat Enterprise Linux 8inkscape:flatpak/python2Not affected
Red Hat Enterprise Linux 8python27:2.7/python2Not affected
Red Hat Enterprise Linux 8python3Not affected
Red Hat Enterprise Linux 8python3.11Not affected
Red Hat Enterprise Linux 8python36:3.6/python36Not affected
Red Hat Enterprise Linux 8python39:3.9/python39Not affected
Red Hat Enterprise Linux 9python3.11Not affected
Red Hat Enterprise Linux 9python3.9Not affected
Red Hat Software Collectionsrh-python38-pythonNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-48566.

Attack patterns (CAPEC)

  • CAPEC-26 Leveraging Race Conditions Likelihood: High · Severity: High
  • CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON