Where.src/background/index.js:1269-1283 (the AUTISTMASK_RPC handler: sender.origin, else new URL(sender.tab.url).origin, else msg.origin).
What is wrong. When sender.origin is absent (Firefox before 126) the
handler attributes the request to the top-level tab URL, so a cross-origin
iframe's request is credited to the embedding page; the final fallback trusts msg.origin, a value carried in the message. sender.url — the URL of the frame
that actually sent the message — is never consulted.
Why it matters. On out-of-support Firefox a hostile iframe on a connected
site inherits the embedding site's connection and prompts appear under the
embedding site's name. On current browsers sender.origin is always present, so
there is no effect there; the msg.origin fallback is unreachable for a genuine
content-script sender (there is no externally_connectable). This is
defence-in-depth and hygiene rather than a live hole on supported browsers.
Acceptable. Prefer sender.origin, then new URL(sender.url).origin, and
refuse the request when neither is available rather than trusting msg.origin.
Definition of done.
Origin is taken from sender.origin, then sender.url; the msg.origin
fallback is removed.
A request with neither trusted source is refused.
A test asserts an iframe sender is attributed to the frame origin, not the
top-level tab.
Model: fable-5-1 (review); opus-4-8 (filing)
Severity: hardening.
**Where.** `src/background/index.js:1269-1283` (the `AUTISTMASK_RPC` handler:
`sender.origin`, else `new URL(sender.tab.url).origin`, else `msg.origin`).
**What is wrong.** When `sender.origin` is absent (Firefox before 126) the
handler attributes the request to the top-level tab URL, so a cross-origin
iframe's request is credited to the embedding page; the final fallback trusts
`msg.origin`, a value carried in the message. `sender.url` — the URL of the frame
that actually sent the message — is never consulted.
**Why it matters.** On out-of-support Firefox a hostile iframe on a connected
site inherits the embedding site's connection and prompts appear under the
embedding site's name. On current browsers `sender.origin` is always present, so
there is no effect there; the `msg.origin` fallback is unreachable for a genuine
content-script sender (there is no `externally_connectable`). This is
defence-in-depth and hygiene rather than a live hole on supported browsers.
**Acceptable.** Prefer `sender.origin`, then `new URL(sender.url).origin`, and
refuse the request when neither is available rather than trusting `msg.origin`.
**Definition of done.**
- [ ] Origin is taken from `sender.origin`, then `sender.url`; the `msg.origin`
fallback is removed.
- [ ] A request with neither trusted source is refused.
- [ ] A test asserts an iframe sender is attributed to the frame origin, not the
top-level tab.
Model: fable-5-1 (review); opus-4-8 (filing)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity: hardening.
Where.
src/background/index.js:1269-1283(theAUTISTMASK_RPChandler:sender.origin, elsenew URL(sender.tab.url).origin, elsemsg.origin).What is wrong. When
sender.originis absent (Firefox before 126) thehandler attributes the request to the top-level tab URL, so a cross-origin
iframe's request is credited to the embedding page; the final fallback trusts
msg.origin, a value carried in the message.sender.url— the URL of the framethat actually sent the message — is never consulted.
Why it matters. On out-of-support Firefox a hostile iframe on a connected
site inherits the embedding site's connection and prompts appear under the
embedding site's name. On current browsers
sender.originis always present, sothere is no effect there; the
msg.originfallback is unreachable for a genuinecontent-script sender (there is no
externally_connectable). This isdefence-in-depth and hygiene rather than a live hole on supported browsers.
Acceptable. Prefer
sender.origin, thennew URL(sender.url).origin, andrefuse the request when neither is available rather than trusting
msg.origin.Definition of done.
sender.origin, thensender.url; themsg.originfallback is removed.
top-level tab.
Model: fable-5-1 (review); opus-4-8 (filing)