# CVE-2026-23996: FastAPI Api Key has a timing side-channel in verify_key that allows statistical key validity detection

- Severity: Low 3.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.29%, higher than 23% of CVEs (2026-12-01)
- Published: 2026-01-21T22:27:39.000Z
- Modified: 2026-07-07T17:57:38.313Z
- Also known as: GHSA-95c6-p277-p87g, PYSEC-2026-1358
- Weaknesses: CWE-208
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- Athroniaeth fastapi-api-key: < 1.1.0
- fastapi-api-key (PyPI): before 1.1.0
- athroniaeth fastapi_api_key: before 1.1.0

## Every score

- GitHub_M: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- PyPA Advisory Database: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://github.com/Athroniaeth/fastapi-api-key/security/advisories/GHSA-95c6-p277-p87g> (mitigation, patch, vendor-advisory, web)
- <https://github.com/Athroniaeth/fastapi-api-key/commit/310b2c5c77305f38c63c0b917539a0344071dfd8> (patch, web)
- <https://github.com/Athroniaeth/fastapi-api-key/releases/tag/1.1.0> (product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-23996> (advisory)
- <https://github.com/Athroniaeth/fastapi-api-key> (package)
- <https://pypi.org/project/fastapi-api-key> (package)
- <https://github.com/advisories/GHSA-95c6-p277-p87g> (advisory)

## Sources

- CVE List: [CVE-2026-23996](https://www.cve.org/CVERecord?id=CVE-2026-23996), CVE Terms of Use, modified 2026-01-22
- GitHub Advisory Database: [GHSA-95c6-p277-p87g](https://github.com/advisories/GHSA-95c6-p277-p87g), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2026-23996](https://nvd.nist.gov/vuln/detail/CVE-2026-23996), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1358](https://osv.dev/vulnerability/PYSEC-2026-1358), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2026-23996 · Whole record: https://cve.day/CVE-2026-23996.json · Rebuilt by cve.day 2026-11-25T22:59:13.032Z
