Mittel

Authlib: Cross-site request forging when using cache

  • Veröffentlicht: 16.04.2026
  • Aktualisiert: 11.10.2026 15:17

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.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) authlib < 1.6.11 1.6.11

Verweise

CVSS-Wert 5.4/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Schwäche (CWE)
CWE-352
Plattform
Python (PyPI)
Paket
authlib
Veröffentlicht
16.04.2026
Aktualisiert
11.10.2026 15:17

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2026-25 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-jj8c-mmj3-mmgv - CC BY 4.0

Schwachstellenhistorie: authlib

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (12) im Archiv
Einträge insgesamt
12
Erste → letzte
06.2024 06.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 1
  • Hoch 6
  • Mittel 5

Veröffentlichungen pro Jahr

  1. 2024: 1
  2. 2025: 3
  3. 2026: 8
Schweregrad:
  1. Authlib: Cross-site request forging when using cache dieser Eintrag
    Mittel · 5.4 CVE-2026-41425 < 1.6.11 1.6.11
  2. Kritisch · 9.1 CVE-2026-27962 < 1.6.9 1.6.9

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.