Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm

GHSA-376v-xgjx-7mfr

HIGH

fastify-bearer-auth vulnerable to Timing Attack Vector

Also known asCVE-2022-31142
Published
Jul 15, 2022
Updated
Nov 8, 2023
Affected
3 pkgs
Patched
2 / 3
Exploits
None indexed

EPSS Exploitation Probability

via FIRST.org ↗
1.2%probability of exploitation in next 30 days
Lower Risk63th percentile+0.42%
0.00%0.55%1.10%1.66%0.4%1.2%Dec 25Apr 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

3 pkgs affected
📦fastify-bearer-auth📦@fastify/bearer-auth📦@fastify/bearer-auth

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.

Description

Impact

fastify-bearer-auth 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.

All versions of fastify-bearer-auth are also affected.

Patches

We released:

  • v8.0.1 with a fix for the Fastify v4 line
  • v7.0.2 with a fix for the Fastify v3 line

Workarounds

There are no workarounds. Update your dependencies.

References

https://hackerone.com/reports/1633287

For more information

If you have any questions or comments about this advisory:

Affected Packages

3 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npmfastify-bearer-auth5.0.1No fix
📦npm@fastify/bearer-authall versions7.0.2
📦npm@fastify/bearer-auth8.0.0&&< 8.0.18.0.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for fastify-bearer-auth. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    No patched version of fastify-bearer-auth has shipped for GHSA-376v-xgjx-7mfr yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-376v-xgjx-7mfr is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-376v-xgjx-7mfr. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact fastify-bearer-auth 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. All versions of fastify-bearer-auth are also affected. ### Patches We released: * v8.0.1 with a fix for the Fastify v4 line * v7.0.2 with a fix for the Fastify v3 line ### Workarounds There are no workarounds. Update your dependencies. ### References https://hackerone.com/reports/1633287
O3 Security · Impact-Aware SCA

Is GHSA-376v-xgjx-7mfr in your dependencies?

O3 detects GHSA-376v-xgjx-7mfr across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.