CVE-2025-68158 Authlib: 1-click Account Takeover

Medium 5.7 Published Updated

Attackers can hijack user accounts via CSRF when cache-backed state storage is used, as state tokens are not tied to user sessions.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-68158?

CVE-2025-68158 is a medium-severity vulnerability in authlib, published on 8 Jan 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

Authlib is a Python library which builds OAuth and OpenID Connect servers. In versions 1.0.0 through 1.6.5, cache-backed state/request-token storage is not tied to the initiating user session, so CSRF is possible for any attacker that has a valid state (easily obtainable via an attacker-initiated authentication flow). When a cache is supplied to the OAuth client registry, FrameworkIntegration.set_state_data writes the entire state blob under _state_{app}_{state}, and get_state_data ignores the caller’s session altogether. This issue has been patched in version 1.6.6.

Weakness: CWE-352

Which versions are affected by CVE-2025-68158?

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

PackageAffectedFixed in
authlib PyPIFrom 1.0.01.6.6
authlib PyPIFrom 1.0.01.6.6
authlib PyPIFrom 1.0.01.6.6
Linux distribution packages (4)
python-Authlib SUSE:Linux Enterprise Module for Python 3 15 SP7All versions1.3.1-150600.3.14.1
python-Authlib openSUSE:Leap 15.6All versions1.3.1-150600.3.14.1
python-Authlib openSUSE:Leap 16.0All versions1.5.2-bp160.2.1
python-Authlib openSUSE:TumbleweedAll versions1.6.6-1.1

Products include Authlib Authlib.

How do I fix CVE-2025-68158?

Upgrade authlib to 1.6.6 or later.

Is CVE-2025-68158 being exploited?

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

Sources

Also known as DEBIAN-CVE-2025-68158, ECHO-9727-a15c-fedd, GHSA-fg6f-75jq-6523, MINI-2ww7-2mrm-vvq5, MINI-739w-f9m4-9ppc, PYSEC-2026-1201 and 4 more.

Is CVE-2025-68158 in your software?

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

Check your SBOMs for free