SEC2-081: Test accepts a token wider than captures without a word, so the threat model's bound on a leaked extension token is unchecked #38
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#38
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: Low · Category: Authentication/Authorization · Reference: CWE-250 (Execution with Unnecessary Privileges); OWASP A01:2021 (Broken Access Control)
Location:
src/options.js:138-142(the scopes are read and only the absence ofcapturesis said)src/options.html:18-21(tokenHint: "with thecapturesscope and nothing more")docs/THREAT-MODEL.md:20(the promise)Issue
The core's threat model bounds "someone with the token of a browser extension" to "the capture
API only … an extension's token holds
capturesand nothing else, so the worst it can do is filla review queue". The extension stores whatever token is pasted in
storage.local, which thebrowser keeps unencrypted on disk (
PRIVACY.md:12-16), andGET /metells it the token'sscopes. When they include
read,writeorlistings:bindas well, Test answers in green withthe list, and Save never asks. A token that can read applications, CVs and the home address then
sits in the place the threat model assumes holds only
captures.Impact
Not an exploit by itself: it is the person who issued the wide token. What is lost is the one
moment the extension could keep the promise the core makes about it. A copy of the browser
profile, or a future weakness in the extension, then yields a full-scope token where the threat
model expects a harmless one.
Fix
In the Test handler, after
canCapture:with
tokenTooWideadded toen/messages.json("This token can also $1. The extension needscapturesonly: issue one with that scope alone and revoke this one."). The stronger form is tohave Save call
whoAmIonce the permission is granted and refuse a token with extra scopes.Done when
test/api.test.mjsor a new options test shows the warning forscopes: ["captures", "read"]and silence for["captures"].Related
#1 (closed) is about reading
errors, not scope width.