fix(locksmith): block private URLs for Apple Wallet pass thumbnails - #16594
Open
SashaMIT wants to merge 1 commit into
Open
fix(locksmith): block private URLs for Apple Wallet pass thumbnails#16594SashaMIT wants to merge 1 commit into
SashaMIT wants to merge 1 commit into
Conversation
createAppleWalletPass fetched lock metadata.image with no SSRF checks on an unauthenticated pass route. Reuse assertSafeCallbackUrl (WebSub twin) and refuse redirects before the thumbnail download.
|
Thank you for your pull request and welcome to Unlock! We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @SashaMIT on file. |
|
@SashaMIT is attempting to deploy a commit to the Unlock Protocol Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced Aug 9, 2026
Author
|
CLA sign PR opened per cla-bot: #16596 (single-file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sibling of #16593 (WebSub
hub.callbackSSRF).createAppleWalletPassfetches lockmetadata.imagevia barefetchwhile generating a pass for unauthenticatedGET /v2/pass/.../ios. A lock manager can pointimageat a private/link-local URL and make Locksmith request it.This reuses
assertSafeCallbackUrl(same helper as #16593) before the thumbnail download and setsredirect: 'error'so a 3xx cannot bypass the host check.If #16593 merges first, rebase will drop the shared util add and keep only the pass call-site. If this merges first, #16593 can reuse the util as-is.
Test plan
npx vitest run __tests__/utils/safeCallbackUrl.test.ts(3 passed)Made with Cursor