{"id":"CVE-2026-23996","summary":"FastAPI Api Key has a timing side-channel in verify_key that allows statistical key validity detection","details":"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.","aliases":["GHSA-95c6-p277-p87g"],"modified":"2026-04-10T05:42:07.000753Z","published":"2026-01-21T22:29:24.107Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23996.json","cwe_ids":["CWE-208"],"cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://github.com/Athroniaeth/fastapi-api-key/releases/tag/1.1.0"},{"type":"ADVISORY","url":"https://github.com/Athroniaeth/fastapi-api-key/security/advisories/GHSA-95c6-p277-p87g"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23996.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23996"},{"type":"FIX","url":"https://github.com/Athroniaeth/fastapi-api-key/commit/310b2c5c77305f38c63c0b917539a0344071dfd8"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/athroniaeth/fastapi-api-key","events":[{"introduced":"0"},{"fixed":"87b27640f77c5ef86c46311b6b5a7e2887e35b77"}]}],"versions":["0.10.0","0.13.0","0.13.1","0.13.2","0.13.3","0.2.1","0.4.0","0.6.0","0.7.1","0.7.2","0.7.3","0.8.0","0.8.1","0.8.2","1.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-23996.json"}},{"ranges":[{"type":"GIT","repo":"https://github.com/athroniaeth/keyshield","events":[{"introduced":"0"},{"fixed":"310b2c5c77305f38c63c0b917539a0344071dfd8"},{"fixed":"87b27640f77c5ef86c46311b6b5a7e2887e35b77"}]}],"versions":["0.10.0","0.13.0","0.13.1","0.13.2","0.13.3","0.2.1","0.4.0","0.6.0","0.7.1","0.7.2","0.7.3","0.8.0","0.8.1","0.8.2","1.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-23996.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"}]}