Chromium: Same Origin Policy bypass within a single site a.k.a. "Google Roulette"
Breakpoints set with the DevTools console utility debug() persisted across page reloads and leaked into other origins that shared the same Chromium process within one Site. An attacker who convinced a victim to run a console command could therefore execute code on other origins of the same site, bypassing the Same Origin Policy within that site.
Published on bentkowski.info
Suppose you’re visiting a legit website, like developers.google.com, which tells you to open a JavaScript console in your browser, and then just invoke a function called magic(). Would you do it?
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the debug() breakpoint state was stored per renderer process rather than per origin, so it survived reloads and was reused when the process served another origin of the same Site.
Impact
Code entered on one origin could run on other origins of the same Site, a Same Origin Policy bypass limited to a single Site; the author notes it is not practically exploitable because the victim must type code into DevTools.
What the attacker needed
Victim types code in the DevTools console; origins belong to the same Site; browser reuses one process for them
How it was found
- Open the developer console on a page of one origin and set a breakpoint with debug() whose condition calls another function.
- Trigger the watched function, for example by typing in a search box, and observe the messages.
- Reload the page and observe that the breakpoint still fires.
- Navigate to a different origin of the same Site and observe that the breakpoint code still executes there.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A browser normally keeps websites apart so one site cannot read another's data; this is the Same Origin Policy. The author found that a debugging feature in the browser's developer console kept running after a page reload and even after navigating to a different website that the browser happened to load in the same background process. So code a person typed on one site could later run on another site, as long as both belong to the same overall site.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.