Read the docs
TI-2022-13185 Aliases CVE-2022-31142GHSA-376v-xgjx-7mfr

Potential Timing Attack Vector in @fastify/bearer-auth

Priority MEDIUM 42CWE-208Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Information disclosure
Confidentiality · integrity · availability
High · None · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-208.

Summary

@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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01496 74th percentileScored 2026-11-07
Fix Fixed fastify-bearer-auth (fastify): 7.0.2@fastify/bearer-auth (npm): 7.0.2, 8.0.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
fastifyfastify-bearer-auth5.0.1 to before 7.0.2; = 8.0.07.0.2Patch availableCNA
—fastify-bearer-auth (npm)5.0.1 – 6.0.3—No fix listedGHSA-376v-xgjx-7mfr
—@fastify/bearer-auth (npm)before 7.0.27.0.2Patch availableGHSA-376v-xgjx-7mfr
—@fastify/bearer-auth (npm)8.0.0 to before 8.0.18.0.1Patch availableGHSA-376v-xgjx-7mfr
  • fastify-bearer-auth Vendorfastify Affected 5.0.1 to before 7.0.2; = 8.0.0 Fixed in 7.0.2 Patch available CNA
  • fastify-bearer-auth (npm) Vendor— Affected 5.0.1 – 6.0.3 Fixed in — No fix listed GHSA-376v-xgjx-7mfr
  • @fastify/bearer-auth (npm) Vendor— Affected before 7.0.2 Fixed in 7.0.2 Patch available GHSA-376v-xgjx-7mfr
  • @fastify/bearer-auth (npm) Vendor— Affected 8.0.0 to before 8.0.1 Fixed in 8.0.1 Patch available GHSA-376v-xgjx-7mfr

CPE configurations NVD · 2

CPEVersionsRoleVendor
cpe:2.3:a:fastify:bearer-auth:*:*:*:*:*:node.js:*:*5.0.1 to before 7.0.2Vulnerablefastify
cpe:2.3:a:fastify:bearer-auth:8.0.0:*:*:*:*:node.js:*:*8.0.0Vulnerablefastify
  • cpe:2.3:a:fastify:bearer-auth:*:*:*:*:*:node.js:*:* Versions 5.0.1 to before 7.0.2 Vulnerable ·fastify
  • cpe:2.3:a:fastify:bearer-auth:8.0.0:*:*:*:*:node.js:*:* Versions 8.0.0 Vulnerable ·fastify

Remediation

  • Fix · CNA fastify-bearer-auth (fastify) Fixed in 7.0.2
  • Fix · GHSA-376v-xgjx-7mfr @fastify/bearer-auth (npm) Fixed in 7.0.2 Advisory →
  • Fix · GHSA-376v-xgjx-7mfr @fastify/bearer-auth (npm) Fixed in 8.0.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-31142
  2. 2026-10-03 Alias added: GHSA-376v-xgjx-7mfr

References

Sources