CVE-2026-41425
JSON

5.4medium

Authlib: Cross-site request forging when using cache

Severity
5.4medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.11% (higher than 1% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-jj8c-mmj3-mmgvPYSEC-2026-25

Description

Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.6.11, there is no CSRF protection on the cache feature in authlib.integrations.starlette_client.OAuth. This vulnerability is fixed in 1.6.11.

Affected

Product or packageVersionsReported by
authlib authlib< 1.6.11, before 1.6.11CVE List, NVD
authlib (PyPI)before 1.6.11GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
GitHub5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
PyPA Advisory Database5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Classification

CWE-352

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.6.11, there is no CSRF protection on the cache feature in authlib.integrations.starlette_client.OAuth. This vulnerability is fixed in 1.6.11.

GitHub Advisory Database
Summary

There is no CSRF protection on the cache feature on most integrations clients.

Details

In authlib.integrations.starlette_client.OAuth, no CSRF protection is set up when using the cache parameter. When not using the cache parameter, the use of SessionMiddleware ties the client to the auth state, preventing CSRF attacks. With the cache, there is no such mechanism. Other integratons have the same issue, it's not just starlette.

The state parameter is taken from the callback URL and the state is fetched from the cache without checking that it is the same client calling the redirect endpoint as was the one that initiated the auth flow.

This issue is documented in RFC 6749 section 10.12: https://datatracker.ietf.org/doc/html/rfc6749#section-10.12

PoC
  • Set up a Starlette integration with a cache
  • The attacker starts the auth flow up until before the callback URL is followed.
  • The attacked sends the redirect URL to the victim
  • The victim now completes the authorisation
Impact

This impacts all users that use the cache to store auth state.

All users will be vulnerable to CSRF attacks and may have an attacker's account tied to their own.

NVD (es)

Authlib es una biblioteca de Python que construye servidores OAuth y OpenID Connect. Antes de la versión 1.6.11, no hay protección CSRF en la característica de caché en authlib.integrations.starlette_client.OAuth. Esta vulnerabilidad está corregida en la versión 1.6.11.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-41425 changed 2026-04-27CVE Terms of Use
GitHub Advisory DatabaseGHSA-jj8c-mmj3-mmgv changed 2026-09-10CC-BY-4.0
NVDCVE-2026-41425 changed 2026-11-11Public domain
PyPA Advisory DatabasePYSEC-2026-25 changed 2026-05-20CC-BY-4.0