CVE-2026-23996

FastAPI Api Key provides a backend-agnostic library that provides an API key system. Version 1.1.0 has a timing side-channel vulnerability in verify_key(). The method applied a random delay only on verification failures, allowing an attacker to statistically distinguish valid from invalid API keys by measuring response latencies. With enough repeated requests, an adversary could infer whether a key_id corresponds to a valid key, potentially accelerating brute-force or enumeration attacks. All users relying on verify_key() for API key authentication prior to the fix are affected. Users should upgrade to version 1.1.0 to receive a patch. The patch applies a uniform random delay (min_delay to max_delay) to all responses regardless of outcome, eliminating the timing correlation. Some workarounds are available. Add an application-level fixed delay or random jitter to all authentication responses (success and failure) before the fix is applied and/or use rate limiting to reduce the feasibility of statistical timing attacks.
Configurations

Configuration 1 (hide)

cpe:2.3:a:athroniaeth:fastapi_api_key:*:*:*:*:*:python:*:*

History

17 Jun 2026, 10:22

Type Values Removed Values Added
Summary
  • (es) FastAPI Api Key proporciona una librería agnóstica al backend que proporciona un sistema de claves API. La versión 1.1.0 tiene una vulnerabilidad de canal lateral de temporización en verify_key(). El método aplicó un retraso aleatorio solo en fallos de verificación, permitiendo a un atacante distinguir estadísticamente las claves API válidas de las inválidas midiendo las latencias de respuesta. Con suficientes solicitudes repetidas, un adversario podría inferir si un key_id corresponde a una clave válida, acelerando potencialmente los ataques de fuerza bruta o enumeración. Todos los usuarios que dependen de verify_key() para la autenticación de claves API antes de la corrección se ven afectados. Los usuarios deben actualizar a la versión 1.1.0 para recibir un parche. El parche aplica un retraso aleatorio uniforme (min_delay a max_delay) a todas las respuestas independientemente del resultado, eliminando la correlación de temporización. Hay disponibles algunas soluciones alternativas. Añadir un retraso fijo a nivel de aplicación o fluctuación aleatoria a todas las respuestas de autenticación (éxito y fallo) antes de que se aplique la corrección y/o usar la limitación de velocidad para reducir la viabilidad de los ataques de temporización estadísticos.

27 Feb 2026, 14:52

Type Values Removed Values Added
First Time Athroniaeth fastapi Api Key
Athroniaeth
CPE cpe:2.3:a:athroniaeth:fastapi_api_key:*:*:*:*:*:python:*:*
References () https://github.com/Athroniaeth/fastapi-api-key/commit/310b2c5c77305f38c63c0b917539a0344071dfd8 - () https://github.com/Athroniaeth/fastapi-api-key/commit/310b2c5c77305f38c63c0b917539a0344071dfd8 - Patch
References () https://github.com/Athroniaeth/fastapi-api-key/releases/tag/1.1.0 - () https://github.com/Athroniaeth/fastapi-api-key/releases/tag/1.1.0 - Product, Release Notes
References () https://github.com/Athroniaeth/fastapi-api-key/security/advisories/GHSA-95c6-p277-p87g - () https://github.com/Athroniaeth/fastapi-api-key/security/advisories/GHSA-95c6-p277-p87g - Mitigation, Patch, Vendor Advisory

21 Jan 2026, 23:15

Type Values Removed Values Added
New CVE

Information

Published : 2026-01-21 23:15

Updated : 2026-06-17 10:22


NVD link : CVE-2026-23996

Mitre link : CVE-2026-23996

CVE.ORG link : CVE-2026-23996


JSON object : View

Products Affected

athroniaeth

  • fastapi_api_key
CWE
CWE-208

Observable Timing Discrepancy