CVE-2026-23996: FastAPI Api Key has a timing side-channel in verify_key that allows statistical key validity detection
(updated )
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.
Affected: all users relying on verify_key() for API key authentication prior to the fix.
References
- github.com/Athroniaeth/fastapi-api-key
- github.com/Athroniaeth/fastapi-api-key/commit/310b2c5c77305f38c63c0b917539a0344071dfd8
- github.com/Athroniaeth/fastapi-api-key/releases/tag/1.1.0
- github.com/Athroniaeth/fastapi-api-key/security/advisories/GHSA-95c6-p277-p87g
- github.com/advisories/GHSA-95c6-p277-p87g
- nvd.nist.gov/vuln/detail/CVE-2026-23996
Code Behaviors & Features
Detect and mitigate CVE-2026-23996 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →