CVE-2026-23996: Fastapi api key FastAPI Api Key Has A Vulnerability
LOWCVE-2026-23996 is a LOW (CVSS 3.7) fastapi api key has a vulnerability (CWE-208: Observable Timing Discrepancy) affecting Fastapi api key libraries in the PyPI ecosystem. The issue involves fastapi api key has a timing side-channel in verify_key that allows statistical key validity detection. Remediation is available by upgrading affected packages to version 1.1.0.
CVE-2026-23996 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2026-23996
To remediate this vulnerability, upgrade all affected Fastapi api key dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install fastapi-api-key>=1.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show fastapi-api-key
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-23996, inspect your installed packages using pip:
pip show fastapi-api-key
Analyze the terminal output to locate any version of Fastapi api key in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.0), your application is affected.
Note: The pip show fastapi-api-key command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-208: Observable Timing Discrepancy, where two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not. In Fastapi api key, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-23996 Affected Fastapi api key Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
fastapi-api-key
|
PyPI |
< 1.1.0
|
1.1.0
|
References
Frequently Asked Questions
What is CVE-2026-23996?
Which Fastapi api key versions are affected?
What version fixes CVE-2026-23996?
Is fastapi-api-key affected?
What is the CVSS score of CVE-2026-23996?
What CWE is associated with CVE-2026-23996?
How can I check PyPI dependencies for CVE-2026-23996?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-95c6-p277-p87g",
"modified" : "2026-01-22T15:40:29Z",
"published" : "2026-01-21T22:27:39Z",
"aliases" : [ "CVE-2026-23996" ],
"summary" : "FastAPI Api Key has a timing side-channel in verify_key that allows statistical key validity detection",
"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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "fastapi-api-key"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.0"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-208" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-21T22:27:39Z",
"nvd_published_at" : "2026-01-21T23:15:53Z"
}
}