Repository navigation
Validate TUS Location origin and bump pulsevault-mieweb - #36
Merged
Merged
Conversation
…s origin resolveLocation resolved the server's Location response header via new URL(location, base) with no check that the result stayed on the paired server's origin. A malicious or compromised paired server could return an absolute Location on a different host and receive every subsequent HEAD/PATCH/DELETE for that upload — each carrying Authorization: Bearer <token> — redirecting the capability token to that host instead. This is the "token redirect" threat named in RFC 6750 §10.4, and the same same-origin validation OWASP recommends for any server-supplied redirect target before resending credentials. resolveLocation now throws a non-retryable TusUploadError if the resolved location's origin doesn't match the paired server's. Bumps the pulsevault-mieweb submodule to pick up the corresponding server-side fix for the same class of bug (authorize() resolving a different artifactId than the one a request actually operates on), plus the other hardening in that release.
morepriyam
added a commit
that referenced
this pull request
Aug 12, 2026
…-check Validate TUS Location origin and bump pulsevault-mieweb
This was referenced Dec 4, 2026
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
resolveLocationintus-client.tsresolved the server'sLocationresponse header vianew URL(location, base)with no check that the result stayed on the paired server's origin. A malicious or compromised paired server could return an absoluteLocationon a different host and receive every subsequentHEAD/PATCH/DELETEfor that upload — each carryingAuthorization: Bearer <token>— redirecting the capability token to that host instead. This is the "token redirect" threat named in RFC 6750 §10.4, and matches the same-origin validation OWASP recommends for any server-supplied redirect target before resending credentials.resolveLocationnow throws a non-retryable error if the resolved location's origin doesn't match the paired server's.Also bumps the
pulsevault-miewebsubmodule to pick up the corresponding server-side fix for the same class of bug —authorize()was resolving a different artifactId than the one aPATCH/HEADrequest actually operated on — plus the other hardening merged there (streaming checksum validation, storage collision-guard fixes, https enforcement inbuildUploadLink).Test plan
tus-client.test.ts— 8/8 passing, including two new tests: rejects a cross-originLocation, accepts a same-originLocationon a different path prefixtsc --noEmit— clean