Vulnerabilities in pkg:npm/@simplewebauthn/server
PACKAGEGHSA-6hxq-p678-4hr2 is a LOW registration verification does not sufficiently vulnerability (CWE-296: Improper Following of a Certificate's Chain of Trust) affecting SimpleWebAuthn libraries in the npm ecosystem. The issue involves registration verification does not sufficiently ensure that attestation certificates chain to a trust anchor. Remediation is available by upgrading affected packages to version 13.3.2.
pkg:npm/@simplewebauthn/server
Vulnerability advisories affecting package pkg:npm/@simplewebauthn/server. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-6hxq-p678-4hr2 | - | LOW | SimpleWebAuthn: Registration verification does not sufficiently ensure that attestation certificates chain to a trust anchor |
GHSA-6hxq-p678-4hr2 at a Glance
How to Fix GHSA-6hxq-p678-4hr2
To remediate this vulnerability, upgrade all affected SimpleWebAuthn dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @simplewebauthn/server@13.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @simplewebauthn/server
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-6hxq-p678-4hr2, inspect your project dependencies using npm:
npm ls @simplewebauthn/server
Analyze the terminal output to locate any version of SimpleWebAuthn in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 13.3.2), your application is affected.
Note: The npm ls @simplewebauthn/server 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-296: Improper Following of a Certificate's Chain of Trust, where the product does not follow, or incorrectly follows, the chain of trust for a certificate back to a trusted root certificate. In SimpleWebAuthn, 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
GHSA-6hxq-p678-4hr2 Affected SimpleWebAuthn Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@simplewebauthn/server
|
npm |
< 13.3.2
|
13.3.2
|
References
Frequently Asked Questions
What is GHSA-6hxq-p678-4hr2?
Which SimpleWebAuthn versions are affected?
What version fixes GHSA-6hxq-p678-4hr2?
Is @simplewebauthn/server affected?
What CWE is associated with GHSA-6hxq-p678-4hr2?
How can I check npm dependencies for GHSA-6hxq-p678-4hr2?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6hxq-p678-4hr2",
"modified" : "2026-09-04T17:33:20Z",
"published" : "2026-09-04T17:33:20Z",
"aliases" : [ ],
"summary" : "SimpleWebAuthn: Registration verification does not sufficiently ensure that attestation certificates chain to a trust anchor",
"details" : "## Summary\n`validateCertificatePath()` does not verify that an attestation's certificate chain actually terminates at a configured trust anchor. When walking the chain it stops at the first self-signed certificate it finds (which could be user-supplied), and exits early.\n\nThis happens before the configured Apple/Google/etc trust anchor (which is concatenated to the end of the chain) is reached.\n\nA user can therefore register a credential and have the server accept it as if it were backed by a genuine Apple / Android SafetyNet / Yubikey / etc.\n\n## Details\n`packages/server/src/helpers/validateCertificatePath.ts`:\n\nThe configured trust anchor is appended to the end of the untrusted chain (line **83**):\n\n```ts\nconst x5cWithTrustAnchor = x5cCertsParsed.concat([anchor]);\n```\n\nThe walk then verifies each cert was signed by the next, but breaks on the first self-signed cert (lines **104–116**):\n\n```ts\nif (issuer.subject === issuer.issuer) {\n // Root cert detected, make sure it signed itself\n const issuerSignedIssuer = await issuer.verify(\n { publicKey: issuer.publicKey, signatureOnly: true },\n WebCrypto,\n );\n if (!issuerSignedIssuer) {\n throw new InvalidSubjectAndIssuer();\n }\n break; // <-- exits before the appended trust anchor is ever checked if user supplied self-signed cert comes first\n}\n```\n\nThe success condition is therefore \"the certs form an internally-consistent chain ending in some self-signed cert\" Rather than \"the chain terminates at one of the configured trust anchors.\"\n\n## Exploit shape\n\n```\nattacker sends: x5c = [ forgedLeaf (signed by attacker root),\n attackerSelfSignedRoot ]\n\nlibrary builds: [ forgedLeaf, attackerSelfSignedRoot, <configured Apple/Google/etc root> ]\n\nwalk: forgedLeaf -> attackerSelfSignedRoot (verifies, attacker controls both)\n attackerSelfSignedRoot is self-signed -> break\n attackerSelfSignedRoot -> configured root (NEVER CHECKED)\n```\n\n`return true`. The configured anchor never gets checked.\n\n\nAs far as observed, all attestation enforcement uses validateCertificatePath when using MDS etc.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@simplewebauthn/server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "13.3.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 13.3.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/MasterKale/SimpleWebAuthn/security/advisories/GHSA-6hxq-p678-4hr2"
}, {
"type" : "WEB",
"url" : "https://github.com/MasterKale/SimpleWebAuthn/commit/67a41fed3dfd96cab1dcf414f6d1792a72e06e35"
}, {
"type" : "WEB",
"url" : "https://github.com/MasterKale/SimpleWebAuthn/commit/8a53d70f42bcbb7c744ef1b90e6db35bc4b26d06"
}, {
"type" : "WEB",
"url" : "https://github.com/MasterKale/SimpleWebAuthn/commit/dd0d73c716a528e6645efafbd43a972b64df71f9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/MasterKale/SimpleWebAuthn"
}, {
"type" : "WEB",
"url" : "https://github.com/MasterKale/SimpleWebAuthn/releases/tag/v13.3.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-295", "CWE-296" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-04T17:33:20Z",
"nvd_published_at" : null
}
}