GHSA-G3QJ-J598-CXMQ

GHSA-G3QJ-J598-CXMQ is a high-severity out-of-bounds read vulnerability in fido2-lib (npm), affecting versions <= 3.5.7. It is fixed in 3.5.8.

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 [email protected] / [email protected] (2026-03-08). [email protected] 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

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.

Malik X (@Xvush)

Impact

A read operation accesses a memory location beyond the intended buffer boundary. Typical impact: sensitive data disclosure or crash.

GHSA-G3QJ-J598-CXMQ has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (3.5.8); upgrading removes the vulnerable code path.

Affected versions

fido2-lib (<= 3.5.7)

Security releases

fido2-lib → 3.5.8 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Bump cbor-x to >= 1.6.3 (which pulls cbor-extract >= 2.2.1).

-"cbor-x": "~1.6.0"
+"cbor-x": "^1.6.3"

Frequently Asked Questions

  1. What is GHSA-G3QJ-J598-CXMQ? GHSA-G3QJ-J598-CXMQ is a high-severity out-of-bounds read vulnerability in fido2-lib (npm), affecting versions <= 3.5.7. It is fixed in 3.5.8. A read operation accesses a memory location beyond the intended buffer boundary.
  2. How severe is GHSA-G3QJ-J598-CXMQ? GHSA-G3QJ-J598-CXMQ has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of fido2-lib are affected by GHSA-G3QJ-J598-CXMQ? fido2-lib (npm) versions <= 3.5.7 is affected.
  4. Is there a fix for GHSA-G3QJ-J598-CXMQ? Yes. GHSA-G3QJ-J598-CXMQ is fixed in 3.5.8. Upgrade to this version or later.
  5. Is GHSA-G3QJ-J598-CXMQ exploitable, and should I be worried? Whether GHSA-G3QJ-J598-CXMQ is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-G3QJ-J598-CXMQ is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-G3QJ-J598-CXMQ? Upgrade fido2-lib to 3.5.8 or later.

Other vulnerabilities in fido2-lib

Stop the waste.
Protect your environment with Kodem.