Skip to content
XSS Write-up Advanced

Vue.js devtools Universal XSS (Chrome extension) #1353

The Vue.js devtools Chrome extension's toast function used unsanitised message and type parameters in a template string that was evaluated via chrome.devtools.inspectedWindow.eval, allowing code injection. An attacker could host a page that sends a crafted postMessage, and when the victim opens developer tools in another tab, arbitrary JavaScript executes in that tab's context.

github.com

Published on github.com

Vue.js devtools Universal XSS (Chrome extension)#1353

The author, on github.com

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

Impact

An attacker could execute arbitrary JavaScript in the context of any http(s) tab where the victim opened developer tools, bypassing CSP, and could navigate tabs to any domain to run code there.

What the attacker needed

Vue.js devtools extension installed; Victim visits attacker's page; Victim opens developer tools in another tab

The fix

The issue was fixed by commits that prevent XSS in the toast function.

How it was found

  1. Install and enable Vue.js devtools in Chrome.
  2. Host a proof-of-concept page and visit it, keeping the tab open.
  3. Press F12 in any other tab that has navigated to an http(s) web page, and an alert with the domain will pop up.

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.

The Vue.js devtools extension helps developers inspect Vue apps. It had a flaw where a malicious website could send it a message that was later run as code inside the developer tools of another tab. This meant an attacker could run their own JavaScript on any site the victim had open, as long as the victim opened developer tools.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.