@clerk/shared
4.45.1 · 14 Nov 2026MIT11.8M / weekRepositorynpmAtom feed
4.48.3 is the newest release of 4.x.
In short
1 fixed
Security
Fixes 1 advisory that affected 4.8.2
- HighClerk has an authorization bypass when combining organization, billing, or reverification checksGHSA-w24r-5266-9c3c · 30 Apr 2026Fixed in 4.8.3
Release note
The section about @clerk/shared of a note shared by several packages.
Patch Changes
Fix an authorization bypass in
has(),auth.protect(), and related predicates when a single call combined conditions from more than one dimension (for example,{ permission, reverification }or{ feature, permission }). A dimension that should have denied the request was treated as indeterminate and ignored by the combining logic, allowing other passing dimensions to carry the result and authorize the call when it should have failed closed.Behavior is now:
When a requested dimension cannot be satisfied because the underlying session data is missing, malformed, or invalid, the call denies. Previously these cases were treated as indeterminate and ignored, which could let another passing dimension carry the call.
Fixed a minor bug where
session.checkAuthorization()was building authorization options from the membership row id instead of the organization id.
Single-condition role, permission, feature, and plan checks (
has({ permission }), etc.) are unchanged. Single-conditionreverificationchecks are unchanged on well-formed session data; calls with a missing or malformedfactorVerificationAgepayload now deny where they previously returned indeterminate. Callback-formauth.protect(has => ...)is unaffected unless the callback itself invokes the affected shapes.Separately,
auth.protect()in@clerk/nextjspreviously discarded authorization params (role,permission,feature,plan,reverification) whenever the same argument object also containedunauthenticatedUrl,unauthorizedUrl, ortoken. TypeScript's excess-property check caught this for inline object literals but did not apply once the argument was assigned to a variable, spread, or used from JavaScript. Mixed-shape calls likeauth.protect({ role: 'org:admin', unauthorizedUrl: '/denied' })orauth.protect({ permission: 'org:X', token: 'session_token' })now correctly enforce the authorization check instead of silently letting every authenticated caller through.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.