SEC2-078: Requests that carry the bearer token follow redirects #35
Labels
No labels
bug
documentation
enhancement
performance
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-chromium#35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-10-16 in a read-only security review of
postulo-chromiumatb6c1009, checked by a second, independent pass.Severity: Informational · Category: Data Exposure · Reference: CWE-522 (Insufficiently Protected Credentials); OWASP A07:2021 (Identification and Authentication Failures)
Location:
src/lib/api.js:166-174(request)src/lib/api.js:64-75(headers),src/lib/api.js:177-180,199-217,223-233,241-246,260-277(the callers)Issue
No
redirectoption is given, sofetchfollows redirects (redirect: "follow"is the default)for
GET /me,POST /captures,GET /captures,POST /captures/knownand thePUTof arendering, each carrying
Authorization: Bearer …. Current browsers drop theAuthorizationheader when a redirect crosses origins, so in practice the token stays on the instance's origin;
the extension itself does not make that so, and a same-origin redirect carries the token and the
page to any path the instance's front end chooses.
PRIVACY.md:47-49promises the token goes "tothe address you configured, and to nothing else".
Impact
Defence in depth only: it takes the instance, its reverse proxy, or the network path of a plain
http://…localinstance to issue the redirect, and a browser that still forwardsAuthorizationacross origins.
Fix
Make the promise the extension's own: pass
redirect: "error"inrequest(a redirect thenthrows, is read as "no answer" and the capture waits, which is the right outcome for a
misconfigured proxy), or
redirect: "manual"and treat an opaque-redirect response asunreachable.Done when
test/api.test.mjsasserts that theinithanded tofetchImplcarriesredirect: "error"for every call that carries the token.