GHSA-95C6-P277-P87G
Vulnerability from github – Published: 2026-01-21 22:27 – Updated: 2026-01-22 15:40
VLAI?
Summary
FastAPI Api Key has a timing side-channel in verify_key that allows statistical key validity detection
Details
Impact
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.
Patches
Yes. Users should upgrade to version 1.1.0 (or the version containing this fix). The patch applies a uniform random delay (min_delay to max_delay) to all responses regardless of outcome, eliminating the timing correlation.
Workarounds
- Add an application-level fixed delay or random jitter to all authentication responses (success and failure) before the fix is applied.
- Use rate limiting to reduce the feasibility of statistical timing attacks.
References
- CWE-208: Observable Timing Discrepancy
- Commit: 87b27640f77c5ef86c46311b6b5a7e2887e35b77
- OWASP: https://owasp.org/www-community/attacks/Timing_attack
Severity ?
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "fastapi-api-key"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.1.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-23996"
],
"database_specific": {
"cwe_ids": [
"CWE-208"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-21T22:27:39Z",
"nvd_published_at": "2026-01-21T23:15:53Z",
"severity": "LOW"
},
"details": "### Impact\nTiming 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.\n\nAffected: all users relying on verify_key() for API key authentication prior to the fix.\n\n### Patches\nYes. Users should upgrade to version 1.1.0 (or the version containing this fix). The patch applies a uniform random delay (min_delay to max_delay) to all responses regardless of outcome, eliminating the timing correlation.\n\n### Workarounds\n- Add an application-level fixed delay or random jitter to all authentication responses (success and failure) before the fix is applied.\n- Use rate limiting to reduce the feasibility of statistical timing attacks.\n\n### References\n- CWE-208: Observable Timing Discrepancy\n- Commit: 87b27640f77c5ef86c46311b6b5a7e2887e35b77\n- OWASP: https://owasp.org/www-community/attacks/Timing_attack",
"id": "GHSA-95c6-p277-p87g",
"modified": "2026-01-22T15:40:29Z",
"published": "2026-01-21T22:27:39Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Athroniaeth/fastapi-api-key/security/advisories/GHSA-95c6-p277-p87g"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-23996"
},
{
"type": "WEB",
"url": "https://github.com/Athroniaeth/fastapi-api-key/commit/310b2c5c77305f38c63c0b917539a0344071dfd8"
},
{
"type": "PACKAGE",
"url": "https://github.com/Athroniaeth/fastapi-api-key"
},
{
"type": "WEB",
"url": "https://github.com/Athroniaeth/fastapi-api-key/releases/tag/1.1.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "FastAPI Api Key has a timing side-channel in verify_key that allows statistical key validity detection"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…