GHSA-376v-xgjx-7mfr · Severity: high · Ecosystem: npm — fastify-bearer-auth vulnerable to Timing Attack Vector
@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.
Conclusion & alert: CVE-2022-31142 is rated Moderate Risk (52.1/100): CVSS High severity, with medium exploitation likelihood (EPSS 1.16%). Mandatory action: Review affected assets and schedule remediation.
Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.
EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).
| # | Date | Old EPSS score | New EPSS score | Delta (New - Old) |
|---|---|---|---|---|
| 1 | 2026-06-19 | 1.12% | 1.16% | +0.04% |
| 2 | 2026-06-15 | 0.74% | 1.12% | +0.38% |
| 3 | 2026-03-06 | — | 0.74% | — |
Full EPSS history (42 records total)
CVSS metrics for this CVE.
| Base score | Version | Severity | Vector | Exploitability | Impact | Score source |
|---|---|---|---|---|---|---|
| 7.5 | 3.1 | HIGH |
|
3.9 | 3.6 | [email protected] |
| 7.5 | 3.1 | HIGH |
|
3.9 | 3.6 | [email protected] |
GHSA-376v-xgjx-7mfr · Severity: high · Ecosystem: npm — fastify-bearer-auth vulnerable to Timing Attack Vector
| Vendor | Product | Version | Raw CPE |
|---|---|---|---|
| fastify | bearer-auth | >= 5.0.1, < 7.0.2 | cpe:2.3:a:fastify:bearer-auth:*:*:*:*:*:node.js:*:* |
| fastify | bearer-auth | 8.0.0 | cpe:2.3:a:fastify:bearer-auth:8.0.0:*:*:*:*:node.js:*:* |
| URL | Tags |
|---|---|
| https://github.com/fastify/fastify-bearer-auth/commit/0c468a616d7e56126dc468150f6a5a92e530b8e4 | Patch Third Party Advisory |
| https://github.com/fastify/fastify-bearer-auth/commit/39353b15409ee99474545f615ffb16180cf3b716 | Patch Third Party Advisory |
| https://github.com/fastify/fastify-bearer-auth/commit/f921a0582dc83112039004a9b5041141b50c5b3f | Patch Third Party Advisory |
| https://github.com/fastify/fastify-bearer-auth/security/advisories/GHSA-376v-xgjx-7mfr | Third Party Advisory |
| https://hackerone.com/reports/1633287 | Permissions Required Third Party Advisory |