{"id":"CVE-2026-23996","published":"2026-01-21T22:29:24Z","modified":"2026-01-22T16:49:16Z","title":"FastAPI Api Key has a timing side-channel in verify_key that allows statistical key validity detection","vendor":"Athroniaeth","product":"fastapi-api-key","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.7,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00476,"percentile":0.33468,"provenance":"source"},"cwes":[{"id":"CWE-208","name":"Observable Timing Discrepancy"}],"references":[{"url":"https://github.com/Athroniaeth/fastapi-api-key/security/advisories/GHSA-95c6-p277-p87g","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/Athroniaeth/fastapi-api-key/commit/310b2c5c77305f38c63c0b917539a0344071dfd8","tags":["x_refsource_MISC"]},{"url":"https://github.com/Athroniaeth/fastapi-api-key/releases/tag/1.1.0","tags":["x_refsource_MISC"]}],"priority":{"score":9.3,"factors":[{"name":"EPSS percentile","points":6.69},{"name":"CVSS severity","points":2.59}]},"vendorSlug":"athroniaeth","affectedVersions":[{"vendor":"Athroniaeth","product":"fastapi-api-key","versions":["< 1.1.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-01-22T15:09:24.050000Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"fastapi-api-key","vulnerableRanges":["<1.1.0"],"patched":["1.1.0"],"from":["GHSA-95c6-p277-p87g","PYSEC-2026-1358"],"provenance":"source"}],"summary":{"text":"The fastapi-api-key library by Athroniaeth, in its verify_key() method, applies a random delay only when API key verification fails, creating a timing side-channel. An attacker with network access who can send repeated authentication requests and measure response latencies can statistically distinguish valid from invalid keys and infer whether a given key_id corresponds to a valid key, with no authentication or user interaction required, though the attack demands many repeated requests and high difficulty in practice.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:17:24Z"},"euvd":{"id":"EUVD-2026-4139","exploited":false,"provenance":"source"}}