CVE-2024-37568 Authlib has algorithm confusion with asymmetric public keys

High 7.5 Published Updated

Attackers can bypass JWT signature verification by using asymmetric public keys for HMAC validation, allowing unauthorized access.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-37568?

CVE-2024-37568 is a high-severity authentication bypass vulnerability in n/a, published on 9 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

lepture Authlib before 1.3.1 has algorithm confusion with asymmetric public keys. Unless an algorithm is specified in a jwt.decode call, HMAC verification is allowed with any asymmetric public key. (This is similar to CVE-2022-29217 and CVE-2024-33663.)

Weakness: CWE-347, CWE-284

Which versions are affected by CVE-2024-37568?

3 open source packages ship an affected version, including authlib. It affects 1 product.

PackageAffectedFixed in
authlib PyPIAll versions1.3.1
authlib PyPIAll versions1.3.1
authlib PyPIAll versions1.3.1
Linux distribution packages (4)
python-Authlib SUSE:Linux Enterprise Module for Python 3 15 SP6All versions1.3.1-150600.3.3.1
python-Authlib openSUSE:Leap 15.6All versions1.3.1-150600.3.3.1
python-Authlib openSUSE:TumbleweedAll versions1.3.1-1.1
python-Authlib openSUSE:TumbleweedAll versions1.7.2-3.1

Products include Authlib Authlib.

How do I fix CVE-2024-37568?

Upgrade authlib to 1.3.1 or later.

Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.

Is CVE-2024-37568 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-37568 exists.

Sources

Also known as DEBIAN-CVE-2024-37568, ECHO-37cc-e0ec-bcbe, GHSA-5357-c2jx-v7qh, MGASA-2024-0238, PYSEC-2024-52, ROOT-APP-PYPI-CVE-2024-37568 and 4 more.

Is CVE-2024-37568 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free