CVE-2026-23996 json
FastAPI Api Key has a timing side-channel in verify_key that allows statistical key validity detection
published 2026-01-21 9 mo ago modified 2026-07-07 4 mo ago also GHSA-95c6-p277-p87g , PYSEC-2026-1358 , EUVD-2026-4139
- cvss
- 3.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 21%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi fastapi-api-key 1.1.0
- athroniaeth fastapi_api_key 1.1.0
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 9 mo ago
Exploit prediction
0.29% chance of exploitation in the next 30 days, higher than 21% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
| OSV | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
| GitHub | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | fastapi-api-key | <1.1.0 |
1.1.0 |
Affected products
- Athroniaeth fastapi-api-key
Classification
- Weakness
-
- CWE-208 Observable Timing Discrepancy
References
-
github.com
/Athroniaeth/fastapi-api-key/commit/310b2c5c77305f38c63c0b917539a0344071dfd8
web, patch
-
github.com
/Athroniaeth/fastapi-api-key/security/advisories/GHSA-95c6-p277-p87g
web, mitigation, patch, vendor-advisory
-
github.com
/Athroniaeth/fastapi-api-key/releases/tag/1.1.0
web, product, release-notes
-
nvd.nist.gov
/vuln/detail/CVE-2026-23996
advisory
-
github.com
/Athroniaeth/fastapi-api-key
package
-
pypi.org
/project/fastapi-api-key
package
-
github.com
/advisories/GHSA-95c6-p277-p87g
advisory
Sources
- CVE List CVE-2026-23996
- GitHub Advisory GHSA-95c6-p277-p87g
- NVD CVE-2026-23996
- OSV PYSEC-2026-1358
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.