Timing Attack Affecting @fastify/bearer-auth package, versions <7.0.2>=8.0.0 <8.0.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.16% (54th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-FASTIFYBEARERAUTH-2950817
  • published15 Jul 2022
  • disclosed15 Jul 2022
  • creditUzlopak

Introduced: 15 Jul 2022

CVE-2022-31142  (opens in a new tab)
CWE-208  (opens in a new tab)

How to fix?

Upgrade @fastify/bearer-auth to version 7.0.2, 8.0.1 or higher.

Overview

@fastify/bearer-auth is an An authentication plugin for Fastify

Affected versions of this package are vulnerable to Timing Attack which does not securely use crypto.timingSafeEqual. This allows an attacker to estimate the length of one valid bearer token, reducing the range of characters for a brute force attack.

CVSS Scores

version 3.1