GHSA-jj8c-mmj3-mmgv

Suggest an improvement
Source
https://github.com/advisories/GHSA-jj8c-mmj3-mmgv
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-jj8c-mmj3-mmgv/GHSA-jj8c-mmj3-mmgv.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-jj8c-mmj3-mmgv
Aliases
Downstream
Related
Published
2026-04-16T22:38:03Z
Modified
2026-06-05T14:45:14.477111852Z
Severity
  • 5.4 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N CVSS Calculator
Summary
Authlib: Cross-site request forging when using cache
Details

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.

Database specific
{
    "nvd_published_at": "2026-04-24T20:16:27Z",
    "cwe_ids": [
        "CWE-352"
    ],
    "severity": "MODERATE",
    "github_reviewed_at": "2026-04-16T22:38:03Z",
    "github_reviewed": true
}
References

Affected packages

PyPI / authlib

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.6.11

Affected versions

0.*
0.1rc0
0.1
0.2
0.2.1
0.3
0.4
0.4.1
0.5
0.5.1
0.6
0.7
0.8
0.9
0.10
0.11
0.12
0.12.1
0.13
0.14
0.14.1
0.14.2
0.14.3
0.15
0.15.1
0.15.2
0.15.3
0.15.4
0.15.5
0.15.6
1.*
1.0.0a1
1.0.0a2
1.0.0b1
1.0.0b2
1.0.0rc1
1.0.0
1.0.1
1.1.0
1.2.0
1.2.1
1.3.0
1.3.1
1.3.2
1.4.0
1.4.1
1.5.0
1.5.1
1.5.2
1.6.0
1.6.1
1.6.2
1.6.3
1.6.4
1.6.5
1.6.6
1.6.7
1.6.8
1.6.9
1.6.10

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-jj8c-mmj3-mmgv/GHSA-jj8c-mmj3-mmgv.json"