{"id":"CVE-2025-68158","title":"Authlib is a Python library which builds OAuth and OpenID Connect servers","summary":"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 ha…","severity":"medium","cvss":5.7,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","cwe":["CWE-352"],"vendor":"authlib","product":"authlib","affected":["authlib < 1.6.6"],"patched":["authlib 1.6.6"],"published":"2026-01-08","updated":"2026-10-14","sourceUpdated":"2026-10-14T17:10:00.210","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2025-68158","references":[{"url":"https://github.com/authlib/authlib/commit/2808378611dd6fb2532b189a9087877d8f0c0489","label":"security-advisories@github.com"},{"url":"https://github.com/authlib/authlib/commit/7974f45e4d7492ab5f527577677f2770ce423228","label":"security-advisories@github.com"},{"url":"https://github.com/authlib/authlib/security/advisories/GHSA-fg6f-75jq-6523","label":"security-advisories@github.com"},{"url":"https://github.com/authlib/authlib/security/advisories/GHSA-fg6f-75jq-6523","label":"134c704f-9b21-4f2e-91b3-4a467353bcc0"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68158"},{"url":"https://github.com/authlib/authlib"}],"tags":["nvd","osv","pip"],"epss":0.00272,"epssPercentile":0.19475,"aliases":["GHSA-fg6f-75jq-6523","PYSEC-2026-1201"],"ecosystem":"pip","ingestedAt":"2026-07-08T18:25:48.891Z","slug":"CVE-2025-68158","body":"## Overview\n\nAuthlib 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.\n\n## Affected\n\n- `authlib < 1.6.6`\n\n## Remediation\n\nUpgrade past the affected range:\n\n- `authlib 1.6.6`\n\n## Package advisory (CVE-2025-68158)\n\nAffected packages:\n\n- `authlib >= 1.0.0, < 1.6.6`\n\nPatched in:\n\n- `authlib 1.6.6`\n\nSource: https://osv.dev/vulnerability/GHSA-fg6f-75jq-6523","depth":"sunlit","depthScore":31,"depthScoreParts":{"impact":31.4,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}