CVE-2022-31142
Summary
| CVE | CVE-2022-31142 |
|---|---|
| State | PUBLIC |
| Assigner | [email protected] |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2022-07-14 19:15:00 UTC |
| Updated | 2022-07-20 12:45:00 UTC |
| Description | @fastify/bearer-auth is a Fastify plugin to require bearer Authorization headers. @fastify/bearer-auth prior to versions 7.0.2 and 8.0.1 does not securely use crypto.timingSafeEqual. A malicious attacker could estimate the length of one valid bearer token. According to the corresponding RFC 6750, the bearer token has only base64 valid characters, reducing the range of characters for a brute force attack. Version 7.0.2 and 8.0.1 of @fastify/bearer-auth contain a patch. There are currently no known workarounds. The package fastify-bearer-auth, which covers versions 6.0.3 and prior, is also vulnerable starting at version 5.0.1. Users of fastify-bearer-auth should upgrade to a patched version of @fastify/bearer-auth. |
Risk And Classification
Problem Types: CWE-203
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Application | Fastify | Bearer-auth | All | All | All | All |
| Application | Fastify | Bearer-auth | 8.0.0 | All | All | All |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| Merge pull request from GHSA-376v-xgjx-7mfr · fastify/fastify-bearer-auth@0c468a6 · GitHub | MISC | github.com | |
| Merge pull request from GHSA-376v-xgjx-7mfr · fastify/fastify-bearer-auth@f921a05 · GitHub | MISC | github.com | |
| HackerOne | MISC | hackerone.com | |
| Potential Timing Attack Vector in fastify-bearer-auth · Advisory · fastify/fastify-bearer-auth · GitHub | CONFIRM | github.com | |
| Use `crypto.timingSafeEqual()` instead of `secure-compare` module (#40) · fastify/fastify-bearer-auth@39353b1 · GitHub | MISC | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.