Media

Authlib: Cross-site request forging when using cache

  • Publicada: 16.04.2026
  • Actualizado: 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.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Python (PyPI) authlib < 1.6.11 1.6.11

Referencias

Puntuación CVSS 5.4/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Debilidad (CWE)
CWE-352
Plataforma
Python (PyPI)
Paquete
authlib
Publicada
16.04.2026
Actualizado
11.10.2026 15:17

Fuentes y licencias

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

Historial de vulnerabilidades: authlib

Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (12) en el archivo
Entradas en total
12
Primera → última
06.2024 06.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Crítica 1
  • Alta 6
  • Media 5

Divulgaciones por año

  1. 2024: 1
  2. 2025: 3
  3. 2026: 8
Gravedad:
  1. Authlib: Cross-site request forging when using cache esta entrada
    Media · 5.4 CVE-2026-41425 < 1.6.11 1.6.11
  2. Crítica · 9.1 CVE-2026-27962 < 1.6.9 1.6.9

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.