Security readout for executives and security teams
Plain-English summary
Applications using vulnerable Fastify bearer authentication may leak information about a valid token's length through timing differences. This does not directly grant access, but it weakens token secrecy and could aid attacks against APIs relying on static bearer tokens. Patched versions are available; the advisory names no workaround.
Executive priority
Prioritize remediation for public or partner-facing APIs that use this plugin with bearer tokens. The fix is a dependency upgrade, and delaying leaves token-based access controls weaker than intended. Treat as high priority where bearer tokens protect sensitive data or administrative operations.
Technical view
Improper comparison logic around crypto.timingSafeEqual creates a CWE-208 timing discrepancy. An unauthenticated network attacker could estimate the length of one valid bearer token. Affected versions include @fastify/bearer-auth before 7.0.2, version 8.0.0, and legacy fastify-bearer-auth from 5.0.1 through 6.0.3. Fixed releases are 7.0.2 and 8.0.1.
Likely exposure
Exposure is likely limited to Node.js Fastify applications that use the affected bearer-auth plugin for Authorization header enforcement. Internet-facing APIs using long-lived bearer tokens carry the highest concern. Systems not using these packages are not indicated as affected by the provided sources.
Exploitation context
The CVE has high CVSS severity and network attack characteristics, but the source bundle does not show CISA KEV listing or active exploitation. The issue supports information leakage through timing, which may assist further token attacks but is not described as a complete authentication bypass by itself.
Researcher notes
Focus validation on dependency presence, version ranges, and whether bearer tokens are static or long-lived. The sources support timing-based length disclosure, patched versions, and no workaround. They do not provide evidence of active exploitation or broader product impact beyond the named Fastify packages.
Mitigation direction
- Upgrade @fastify/bearer-auth to 7.0.2, 8.0.1, or later.
- Migrate legacy fastify-bearer-auth users to a patched @fastify/bearer-auth release.
- Rotate bearer tokens after upgrading if token exposure is plausible.
- Review vendor guidance because the advisory states no known workarounds.
Validation and detection
- Check dependency manifests and lockfiles for @fastify/bearer-auth or fastify-bearer-auth versions.
- Identify Fastify routes protected by the affected bearer authentication plugin.
- Confirm deployed artifacts use patched package versions, not only updated source manifests.
- Review access logs for unusual repeated authorization failures against protected API routes.
Public sources used
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
CWE-208: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Open ATT&CK lookupCredential and access behavior lookup
The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
Open ATT&CK lookupCVE-2022-31142 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
Open ATT&CK lookup- Severity
- High
- CVSS
- 7.5 (3.1)
- Known Exploited
- No
- Published
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CNA and ADP enrichment extracted from CVE v5
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
CVSS vector scores
1 official scoreWe collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N3.93.6Primary CVE scoreVulnerability scoring details
Base CVSS 3.1 score
7.5HighVector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Source materials
- CVE List V5 sourceCVE List V5
- https://github.com/fastify/fastify-bearer-auth/security/advisories/GHSA-376v-xgjx-7mfrCVE reference · x_refsource_CONFIRM
- https://github.com/fastify/fastify-bearer-auth/commit/0c468a616d7e56126dc468150f6a5a92e530b8e4CVE reference · x_refsource_MISC
- https://github.com/fastify/fastify-bearer-auth/commit/39353b15409ee99474545f615ffb16180cf3b716CVE reference · x_refsource_MISC
- https://github.com/fastify/fastify-bearer-auth/commit/f921a0582dc83112039004a9b5041141b50c5b3fCVE reference · x_refsource_MISC
- https://hackerone.com/reports/1633287CVE reference · x_refsource_MISC
Products and packages named in the record
CWE details
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
Observable Timing Discrepancy
Observable Timing Discrepancy represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
