Opening a malicious website while running a Nuxt dev server could allow read-only access to code
nuxt
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| @nuxt/webpack-builder npm |
|
|
| @nuxt/rspack-builder npm |
|
|
nuxt
| Product | Affected | Fixed in |
|---|---|---|
| @nuxt/webpack-builder npm |
|
|
| @nuxt/rspack-builder npm |
|
|
Nuxt is an open-source web development framework for Vue.js. Source code may be stolen during dev when using version 3.0.0 through 3.15.12 of the webpack builder or version 3.12.2 through 3.152 of the rspack builder and a victim opens a malicious web site. Because the request for classic script by a script tag is not subject to same origin policy, an attacker can inject a malicious script in their site and run the script. By using `Function::toString` against the values in `window.webpackChunknuxt_app`, the attacker can get the source code. Version 3.15.13 of Nuxt patches this issue.
From the CVE record · GitHub_M
Nuxt’s webpack and rspack builders can expose source code during development. An attacker can obtain it if a developer opens a malicious website; the attack uses a script request that is not restricted by the same-origin policy.
Check projects using npm @nuxt/webpack-builder versions >=3.0.0 <3.15.3 or @nuxt/rspack-builder versions >=3.12.2 <3.15.3.