GHSA-g3qj-j598-cxmq: Fido2 lib Denial of Service Vulnerability

HIGH
CVSS 7.5
CWE-125 CWE-1395 CWE-126
Published
Advisory Summary

GHSA-g3qj-j598-cxmq is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-125: Out-of-bounds Read) affecting Fido2 lib libraries in the npm ecosystem. The issue involves fido2-lib is vulnerable to dos via cbor-extract heap buffer over-read in cbor attestation parsing. Remediation is available by upgrading affected packages to version 3.5.8.

GHSA-g3qj-j598-cxmq at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-g3qj-j598-cxmq
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-125: Out-of-bounds Read
Affected Product Fido2 lib
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix GHSA-g3qj-j598-cxmq

To remediate this vulnerability, upgrade all affected Fido2 lib dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

fido2-lib fixed: 3.5.8
npm install fido2-lib@3.5.8
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls fido2-lib

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-g3qj-j598-cxmq, inspect your project dependencies using npm:

npm ls fido2-lib

Analyze the terminal output to locate any version of Fido2 lib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.5.8), your application is affected.

Note: The npm ls fido2-lib command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Fido2 lib, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary fido2-lib v3.x depends on cbor-x (~1.6.0), which optionally pulls in cbor-extract (C++ native addon). cbor-extract <= 2.2.0 has a heap buffer over-read in `extractStrings()` — a 5-byte CBOR payload crashes Node.js with SIGSEGV. No JS exception, no try/catch, process dead. The crash triggers during WebAuthn registration when the server decodes the attestation object. An attacker sends a crafted authenticator response to the registration endpoint — single request, unauthenticated, instant kill. Fixed in cbor-extract@2.2.1 / cbor-x@1.6.3 (2026-03-08). fido2-lib@3.5.7 still pins cbor-x ~1.6.0 which resolves to vulnerable cbor-extract. ## Affected versions fido2-lib <= 3.5.7 (introduced cbor-x dependency). fido2-lib 2.x uses the old `cbor` package — not affected. Only affects systems where `cbor-extract` native addon is installed (prebuilt binary available for platform). Pure JS fallback is safe. ## PoC ```js const { decode } = require("cbor-x"); decode(Buffer.from("7a10000000", "hex")); // exit code 139 (SIGSEGV) ``` CBOR text string header claiming 268MB in a 5-byte buffer. `extractStrings()` in extract.cpp line 87 calls `readString()` without bounds check. Reads past buffer into unmapped memory. In context: attacker intercepts WebAuthn registration response, replaces `attestationObject` with the 5-byte payload, POSTs to the registration verification endpoint. Server calls `attestationResult()` → `cbor-x.decode()` → `cbor-extract` → SIGSEGV. ## Fix Bump cbor-x to >= 1.6.3 (which pulls cbor-extract >= 2.2.1). ```diff -"cbor-x": "~1.6.0" +"cbor-x": "^1.6.3" ``` — Malik X (@Xvush)

GHSA-g3qj-j598-cxmq Affected Fido2 lib Versions

1 component(s)
Fixed Versions:
3.5.8
Product / Package Ecosystem Affected Versions Fixed Version
fido2-lib
npm
< 3.5.8
3.5.8

References

Frequently Asked Questions

What is GHSA-g3qj-j598-cxmq?
GHSA-g3qj-j598-cxmq is a security vulnerability in Fido2 lib involving fido2-lib is vulnerable to DoS via cbor-extract heap buffer over-read in CBOR attestation parsing under CWE-125: Out-of-bounds Read.
Which Fido2 lib versions are affected?
Affected versions include releases prior to 3.5.8 across affected packages: fido2-lib.
What version fixes GHSA-g3qj-j598-cxmq?
Upgrading to 3.5.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fido2-lib affected?
Yes, fido2-lib is affected in releases prior to 3.5.8. Upgrade your dependency to 3.5.8 or later.
What is the CVSS score of GHSA-g3qj-j598-cxmq?
GHSA-g3qj-j598-cxmq has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with GHSA-g3qj-j598-cxmq?
GHSA-g3qj-j598-cxmq is classified under CWE-125: Out-of-bounds Read (The product reads data past the end, or before the beginning, of the intended buffer.).
How can I check npm dependencies for GHSA-g3qj-j598-cxmq?
Run the dependency tree command: 'npm ls fido2-lib'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g3qj-j598-cxmq",
  "modified" : "2026-03-24T19:10:38Z",
  "published" : "2026-03-24T19:10:38Z",
  "aliases" : [ ],
  "summary" : "fido2-lib is vulnerable to DoS via cbor-extract heap buffer over-read in CBOR attestation parsing",
  "details" : "### Summary\nfido2-lib v3.x depends on cbor-x (~1.6.0), which optionally pulls in cbor-extract (C++ native addon). cbor-extract <= 2.2.0 has a heap buffer over-read in `extractStrings()` — a 5-byte CBOR payload crashes Node.js with SIGSEGV. No JS exception, no try/catch, process dead.\n\nThe crash triggers during WebAuthn registration when the server decodes the attestation object. An attacker sends a crafted authenticator response to the registration endpoint — single request, unauthenticated, instant kill.\n\nFixed in cbor-extract@2.2.1 / cbor-x@1.6.3 (2026-03-08). fido2-lib@3.5.7 still pins cbor-x ~1.6.0 which resolves to vulnerable cbor-extract.\n\n## Affected versions\n\nfido2-lib <= 3.5.7 (introduced cbor-x dependency). fido2-lib 2.x uses the old `cbor` package — not affected.\n\nOnly affects systems where `cbor-extract` native addon is installed (prebuilt binary available for platform). Pure JS fallback is safe.\n\n## PoC\n\n```js\nconst { decode } = require(\"cbor-x\");\ndecode(Buffer.from(\"7a10000000\", \"hex\")); // exit code 139 (SIGSEGV)\n```\n\nCBOR text string header claiming 268MB in a 5-byte buffer. `extractStrings()` in extract.cpp line 87 calls `readString()` without bounds check. Reads past buffer into unmapped memory.\n\nIn context: attacker intercepts WebAuthn registration response, replaces `attestationObject` with the 5-byte payload, POSTs to the registration verification endpoint. Server calls `attestationResult()` → `cbor-x.decode()` → `cbor-extract` → SIGSEGV.\n\n## Fix\n\nBump cbor-x to >= 1.6.3 (which pulls cbor-extract >= 2.2.1).\n\n```diff\n-\"cbor-x\": \"~1.6.0\"\n+\"cbor-x\": \"^1.6.3\"\n```\n\n— Malik X (@Xvush)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "fido2-lib"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.5.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.5.7"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/webauthn-open-source/fido2-lib/security/advisories/GHSA-g3qj-j598-cxmq"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kriszyp/cbor-extract/issues/2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kriszyp/cbor-extract/issues/3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kriszyp/cbor-extract/commit/1f6e0d9704149bdb5531d25f5d08a0280a71e2ca"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/webauthn-open-source/fido2-lib"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-125", "CWE-126", "CWE-1395" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-24T19:10:38Z",
    "nvd_published_at" : null
  }
}