CVE-2026-41425: Authlib Cross-site Request Forging When Using Vulnerability
MODERATECVE-2026-41425 is a MODERATE (CVSS 5.4) cross-site request forging when using vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Authlib libraries in the PyPI ecosystem. The issue involves cross-site request forging when using cache. Remediation is available by upgrading affected packages to version 1.6.11.
CVE-2026-41425 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N).
How to Fix CVE-2026-41425
To remediate this vulnerability, upgrade all affected Authlib dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install authlib>=1.6.11
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show authlib
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-41425, inspect your installed packages using pip:
pip show authlib
Analyze the terminal output to locate any version of Authlib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.11), your application is affected.
Note: The pip show authlib command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Authlib, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-41425 Affected Authlib Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
authlib
|
PyPI |
< 1.6.11
|
1.6.11
|
References
Frequently Asked Questions
What is CVE-2026-41425?
Which Authlib versions are affected?
What version fixes CVE-2026-41425?
Is authlib affected?
What is the CVSS score of CVE-2026-41425?
What CWE is associated with CVE-2026-41425?
How can I check PyPI dependencies for CVE-2026-41425?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jj8c-mmj3-mmgv",
"modified" : "2026-06-05T14:29:21Z",
"published" : "2026-04-16T22:38:03Z",
"aliases" : [ "CVE-2026-41425" ],
"summary" : "Authlib: Cross-site request forging when using cache",
"details" : "### Summary\n\nThere is no CSRF protection on the cache feature on most integrations clients.\n\n### Details\nIn `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.\n\nThe 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.\n\nThis issue is documented in RFC 6749 section 10.12:\nhttps://datatracker.ietf.org/doc/html/rfc6749#section-10.12\n\n### PoC\n- Set up a Starlette integration with a cache\n- The attacker starts the auth flow up until before the callback URL is followed.\n- The attacked sends the redirect URL to the victim\n- The victim now completes the authorisation\n\n### Impact\nThis impacts all users that use the cache to store auth state.\n\nAll users will be vulnerable to CSRF attacks and may have an attacker's account tied to their own.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "authlib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.6.11"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/authlib/authlib/security/advisories/GHSA-jj8c-mmj3-mmgv"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41425"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/authlib/authlib"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/authlib/PYSEC-2026-25.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-352" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-16T22:38:03Z",
"nvd_published_at" : "2026-04-24T20:16:27Z"
}
}