CVE-2022-48566: An issue was discovered in compare_digest in Lib/hmac.py in Python through 3.9.1.

CVE-2022-48566 affects 129 listed versions of Python in the Dawnsentry catalogue.

5.9CVSS medium
Proof of concept publicexploitation
1%EPSS (next 30 days)
22 August 2023published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

Python

129 of 250 listed versions are affected. Fixed in 3.8.7, 3.7.10, 3.6.13. The newest release, 3.15.2, is not affected.

3.8.6 3.7.9 3.7.8 3.7.7 3.7.6 3.7.5 3.7.4 3.7.3 3.6.12 3.6.11 3.6.10 3.6.9 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.5.10 3.5.9 3.5.8 3.5.7 3.5.6 3.5.5 3.5.4 3.5.3 3.5.2 3.5.1 3.5.0 3.4.10 3.4.9 3.4.8 3.4.7 3.4.6 3.4.5 3.4.4 3.4.3 3.4.2 3.4.1 3.4.0 3.3.7 3.3.6 3.3.6-rc1 3.3.5 3.3.5-rc2 3.3.5-rc1 3.3.4 3.3.4-rc1 3.3.3 3.3.3-rc2 3.3.3-rc1 3.3.2 3.3.1 3.3.1-rc1 3.3.0 3.2.2150 3.2.6 3.2.5 3.2.4 and 69 more

What it is

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.

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N (NVD)

Published by MITRE on 22 August 2023. Last changed 17 June 2026.

Sources

Check one version you run: look CVE-2022-48566 up, or pick a product and version in the quick lookup.

Updated 2 December 2026.