fix(deps): update dependency @simplewebauthn/server to v13 [security] - #9557
fix(deps): update dependency @simplewebauthn/server to v13 [security]#9557renovate[bot] wants to merge 1 commit into
Conversation
COMPARE TO
|
| Name | Diff |
|---|---|
| packages/core/package.json | 0 Bytes |
| pnpm-lock.yaml | 📈 +2.51 KB |
There was a problem hiding this comment.
🟡 Changes recommended
The dependency upgrade crosses multiple breaking versions and the current core WebAuthn code/tests still use v10-era SimpleWebAuthn API shapes that likely won’t typecheck/run against v13 without refactoring.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates @simplewebauthn/server in @logto/core from ^10.0.0 to ^13.0.0 (resolved to 13.3.3) to address the security advisory GHSA-6hxq-p678-4hr2 affecting registration attestation trust anchor verification.
Changes:
- Bump
@simplewebauthn/serverdependency inpackages/coreto^13.0.0. - Regenerate
pnpm-lock.yamlto reflect the new SimpleWebAuthn version and its updated transitive dependency graph.
File summaries
| File | Description |
|---|---|
packages/core/package.json |
Updates the direct dependency on @simplewebauthn/server to the v13 major line. |
pnpm-lock.yaml |
Locks @simplewebauthn/server@13.3.3 and updates related transitive dependencies accordingly. |
Review details
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
- Files reviewed: 1/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| "@silverhand/essentials": "^2.9.1", | ||
| "@silverhand/slonik": "31.0.0-beta.2", | ||
| "@simplewebauthn/server": "^10.0.0", | ||
| "@simplewebauthn/server": "^13.0.0", |
cc82d35 to
9fa32eb
Compare
There was a problem hiding this comment.
🟡 Changes recommended
@simplewebauthn/server v13 introduces breaking API changes that are currently not accounted for in @logto/core, so the upgrade is likely to break typecheck/build until the affected call sites/imports are updated.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (1)
packages/core/package.json:53
- Updating
@simplewebauthn/serverto v13 is a breaking change for this package: core/src/libraries/verification-helpers/webauthn.ts currently calls verifyAuthenticationResponse() with the legacyauthenticatoroption (webauthn.ts:171). SimpleWebAuthn v11+ replaced this withcredential, so this dependency bump will fail typecheck/build until the call site is refactored (e.g., map { credentialID, credentialPublicKey } to { id, publicKey }).
"@logto/shared": "workspace:^",
"@silverhand/essentials": "^2.9.1",
"@silverhand/slonik": "31.0.0-beta.2",
"@simplewebauthn/server": "^13.0.0",
"@withtyped/client": "^0.8.8",
- Files reviewed: 1/2 changed files
- Comments generated: 1
- Review effort level: Lite
| "@logto/shared": "workspace:^", | ||
| "@silverhand/essentials": "^2.9.1", | ||
| "@silverhand/slonik": "31.0.0-beta.2", | ||
| "@simplewebauthn/server": "^10.0.0", | ||
| "@simplewebauthn/server": "^13.0.0", | ||
| "@withtyped/client": "^0.8.8", |
9fa32eb to
347fd66
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Migrate WebAuthn callers and fixtures and enforce the patched dependency minimum before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (3)
packages/core/package.json:52
- v13 replaces the
authenticatoroption passed toverifyAuthenticationResponse()withcredential, and renames its fields toidandpublicKey.src/libraries/verification-helpers/webauthn.tsstill constructs the v10 object, which will fail the TypeScript check and cannot verify authentication after this dependency update; migrate that object and its related types.
"@simplewebauthn/server": "^13.0.0",
packages/core/package.json:52
- This major upgrade changes
verifyRegistrationResponse()so registration data is returned underregistrationInfo.credential(id,publicKey, andcounter) rather than the removedcredentialID/credentialPublicKeyfields. The consumers insrc/routes/experience/classes/verifications/web-authn-verification.tsandsrc/routes/interaction/verifications/mfa-payload-verification.tsstill use the v10 shape, so real registrations will fail whenisoBase64URL.fromBuffer()receivesundefined; migrate both consumers and their test fixtures before merging.
"@simplewebauthn/server": "^13.0.0",
packages/core/package.json:52
- This major-version upgrade is not source-compatible with the existing WebAuthn integration. v13 renamed
verifyAuthenticationResponse()'sauthenticatoroption tocredential(and itscredentialID/credentialPublicKeyfields toid/publicKey) and changed registration results to exposeregistrationInfo.credential; the callers inpackages/core/src/libraries/verification-helpers/webauthn.ts,packages/core/src/routes/interaction/verifications/mfa-payload-verification.ts, andpackages/core/src/routes/experience/classes/verifications/web-authn-verification.tsstill use the v10 shapes. This will fail type-checking and, if emitted despite the errors, break authentication and persist undefined registration data. Update the callers and test fixtures together with this dependency change, or remain on a compatible version.
"@simplewebauthn/server": "^13.0.0",
- Files reviewed: 1/2 changed files
- Comments generated: 1
- Review effort level: Lite
| "@silverhand/essentials": "^2.9.1", | ||
| "@silverhand/slonik": "31.0.0-beta.2", | ||
| "@simplewebauthn/server": "^10.0.0", | ||
| "@simplewebauthn/server": "^13.0.0", |
347fd66 to
d4175e1
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
@simplewebauthn/server v13 introduces breaking API changes, and the current core WebAuthn call sites/tests appear to still use the pre-v11 API shape, which is likely to break builds/tests after this bump.
Review details
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (1)
packages/core/package.json:52
- Updating
@simplewebauthn/serverfrom v10 to v13 is a breaking change, but core’s WebAuthn integration still uses the pre-v11 API (e.g. verifyAuthenticationResponse options includeauthenticator, and registrationInfo is read ascredentialID/credentialPublicKey), and there’s also a fragile type import fromnode_modules/@simplewebauthn/server/esm/deps.js. With v13 these are expected to change (e.g.credentialreplacesauthenticator, and registrationInfo nests credential fields), so this version bump is likely to break build/tests unless the call sites and mocks are updated accordingly.
"@simplewebauthn/server": "^13.0.0",
- Files reviewed: 1/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
This PR contains the following updates:
^10.0.0→^13.0.0SimpleWebAuthn: Registration verification does not sufficiently ensure that attestation certificates chain to a trust anchor
GHSA-6hxq-p678-4hr2
More information
Details
Summary
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.This happens before the configured Apple/Google/etc trust anchor (which is concatenated to the end of the chain) is reached.
A 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.
Details
packages/server/src/helpers/validateCertificatePath.ts:The configured trust anchor is appended to the end of the untrusted chain (line 83):
The walk then verifies each cert was signed by the next, but breaks on the first self-signed cert (lines 104–116):
The 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."
Exploit shape
return true. The configured anchor never gets checked.As far as observed, all attestation enforcement uses validateCertificatePath when using MDS etc.
Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
MasterKale/SimpleWebAuthn (@simplewebauthn/server)
v13.3.2Compare Source
This update fixes a CVSS v4 Low (2.0) security vulnerability identified in
@simplewebauthn/server. See the security advisory linked below for more information.
Changes:
verifyRegistrationResponse()allowing a maliciously-craftedattestation statement's
x5cto contain a self-signed "root certificate" instead of chaining backto an RP-specified trust anchor
(GHSA-6hxq-p678-4hr2)
v13.3.1Compare Source
Changes:
verifyRegistrationResponse()failing to verify some Packed andSafetyNet statements (#767)
v13.3.0Compare Source
Changes:
startRegistration()andstartAuthentication()will recognize punycode domainswhen trying to identify why an error occurred
(#750)
verifyMDSBlob()helper method has been added to verify and extract metadatastatements from FIDO MDS blobs. See
the docs here
for more info (#752)
v13.2.3Compare Source
Changes
"Cannot get schema"error that may occurwhen verifying responses after upgrading to v13.2.0+
(#747)
v13.2.2Compare Source
Changes
increased software supply chain transparency, both
libraries are now published via GitHub Actions workflows. Package listings on
JSR and
NPM feature build transparency logs at the
bottom of their respective pages (#725,
#726,
#727)
v13.2.1Compare Source
Changes:
generateRegistrationOptions()will now correctly encoded theuserIDargument tobase64url when it is an instance of Node's
Buffer(#724)
v13.2.0Compare Source
Changes
verifyRegistrationResponse()has been defined more strictlyto communicate that
registrationInfowill only ever be present ifverifiedistrue(#715)
verifyRegistrationResponse()can now verify attestations containing SHA256 hashesby using EC public keys with the P-384 curve
(#721)
by setting
attestationSafetyNetEnforceCTSCheck: falsewhen callingverifyRegistrationResponse(). This check remains enforced by default(#722)
generic typing for
Uint8Arrayvia TypeScript 5.7.SimpleWebAuthn values of type
Uint8Array_are equivalent toUint8Arrayin Deno 2.1 andearlier, and
Uint8Array<ArrayBuffer>in Deno 2.2 and later.(#717)
v13.1.2Compare Source
Changes
ResidentKeyRequirementtype to help with type inference(#704)
v13.1.1Compare Source
Changes:
"android-key"attestation statement verification has been modernized(#675)
"tpm"attestation statements(#673)
v13.1.0Compare Source
Changes:
cross-fetchdependency has been removed from the project to silence in theconsole
DeprecationWarning's about a "punycode" module(#661)
startRegistration()andstartAuthentication()will now warn about calls madeusing the pre-v11 call structure to encourage refactoring to use the current call structure, but
still try to handle such calls the best they can
(#664)
v13.0.0Compare Source
Hot on the heels of the last major release, v13 introduces support for registration hints! Refined
types and improved attestation trust anchor verification are also included. Last but not least, we
say goodbye to one of the project's packages for better docs and fewer dependencies to install. Read
on for more information, including refactor advice for dealing with the retirement of
@simplewebauthn/types.
Changes:
preferredAuthenticatorTypeargument can be set when callinggenerateRegistrationOptions()to generate options that encourage the browser to direct the userto register one of three types of authenticators:
'securityKey','localDevice', or'remoteDevice'(a.k.a. opinionatedWebAuthn hints
support) (#653)
startRegistration()will recognizehintsif specified inoptionsJSON(#652)
(#650)
within the browser and server packages. See Breaking Changes below for more info
(#655)
Breaking Changes
@typescript/types is being retired
Its types will now be included directly in @simplewebauthn/browser and
@simplewebauthn/server.
To refactor existing imports from /types, simply import them from /browser or /server
instead:
Before:
After:
[server]
attestationTypeno longer accepts'indirect'The benefits of indirect attestation are too minimal to be useful for Relying Parties. In practice
it is almost never used over ignoring the concept completely with
'none'or needing to beintentional and setting
'direct'.RP's that have been specifying
attestationType: 'indirect'when callinggenerateRegistrationOptions()will need to refactor their code to either omitattestationType(generateRegistrationOptions()will default toattestationType: 'none') or setattestationType: 'direct'instead:Before:
After:
-or-
v12.0.0Compare Source
All SimpleWebAuthn packages are now available for installation from the
JavaScript Registry (JSR)! JSR is an "open-source package registry
for modern JavaScript and TypeScript" - you can read more about this new package registry and its
ESM-centric capabilities here.
All packages in v12.0.0 are functionally identical to v11.0.0! And JSR package hosting is in
addition to existing package hosting on NPM. Nothing changes about package installation via
npm install. Read on for more information.Packages
Changes
imports are supported (#634)
@simplewebauthn/browser (#634)
To install from JSR, use
npx jsr add @simplewebauthn/...ordeno add jsr:@simplewebauthn/...depending on which package manager is available.
Projects using
npmfor package management:Projects using
denofor package management:Projects using HTTPS modules via deno.land/x:
v12.0.0 officially deprecates importing SimpleWebAuthn from deno.land/x. See Breaking Changes
below for refactor guidance.
Breaking Changes
Importing SimpleWebAuthn packages from
"https://deno.land/x/simplewebauthn/..."URLs is no longersupported. Please use Deno's native support for JSR imports instead, available in projects running
Deno v1.42 and higher.
Before:
After:
Alternatively, use
deno addto install these packages fromJSR:
# Deno v1.42 and higher deno add jsr:@simplewebauthn/serverv11.0.0Compare Source
Say hello to support for automatic passkey registration, support for valid conditional UI
<input>elements stashed away in web components, and to the new
WebAuthnCredentialtype that modernizessome logic within.
There are some breaking changes in this release! Please see Breaking Changes below for refactor
guidance.
Packages
Changes
useAutoRegisterargument has been added tostartRegistration()tosupport attempts to automatically register passkeys for users who just completed non-passkey auth.
verifyRegistrationResponse()has gained a newrequireUserPresenceoption that can be set tofalsewhen verifying responses fromstartRegistration({ useAutoRegister: true, ... })(#623)
verifyBrowserAutofillInputargument has been added tostartAuthentication()to disable throwing an error when a correctly configured<input>elementcannot be found (but perhaps a valid one is present in a web component shadow's DOM)
(#621)
AuthenticatorDevicetype has been renamed toWebAuthnCredentialandhas had its properties renamed. The return value out of
verifyRegistrationResponse()andcorresponding inputs into
verifyAuthenticationResponse()have been updated accordingly. SeeBreaking Changes below for refactor guidance
(#625)
verifyRegistrationResponse()now verifies that the authenticator data AAGUIDmatches the leaf cert's
id-fido-gen-ce-aaguidextension AAGUID when it is present(#609)
IBM (#610)
uvmanddpkhave been removed(#611)
Breaking Changes
[browser] Positional arguments in
startRegistration()andstartAuthentication()have been replaced by a single objectProperty names in the object match the names of the previously-positional arguments. To update
existing implementations, wrap existing options in an object with corresponding properties:
Before:
After:
[server] [types] The
AuthenticatorDevicetype has been renamed toWebAuthnCredentialAuthenticatorDevice.credentialIDandAuthenticatorDevice.credentialPublicKeyhave been shortenedto
WebAuthnCredential.idandWebAuthnCredential.publicKeyrespectively.verifyRegistrationResponse()has been updated accordingly to return a newcredentialvalue oftype
WebAuthnCredential. Update code that storescredentialID,credentialPublicKey, andcounterout ofverifyRegistrationResponse()to storecredential.id,credential.publicKey,and
credential.counterinstead:Before:
After:
Update calls to
verifyAuthenticationResponse()to match the newcredentialargument thatreplaces the
authenticatorargument:Before:
After:
v10.0.1Compare Source
Packages
Changes
isoCrypto.verify()now has better support for signature verification with ECCpublic keys using P-256, P-385, and P-521 curves
(#594, with thanks to @nlordell)
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.