# CVE-2025-24361: Opening a malicious website while running a Nuxt dev server could allow read-only access to code

> An attacker can steal source code from a running Nuxt dev server by tricking a developer into visiting a malicious website.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 25 Jan 2025
- **Updated:** 12 Feb 2025
- **Also known as:** CLSA-2026-1776040398, CLSA-2026-1792161443, CLSA-2026-1792161449, CLSA-2026-1792161583, CLSA-2026-1792161589, CLSA-2026-1792161807, CLSA-2026-1792161811, CLSA-2026-1792161920, CLSA-2026-1792161925, GHSA-4gf7-ff8x-hq99

## What is CVE-2025-24361?

CVE-2025-24361 is a medium-severity vulnerability in nuxt, published on 25 Jan 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-749 (Exposed Dangerous Method or Function)

## Which versions are affected by CVE-2025-24361?

4 open source packages ship an affected version, including @nuxt/rspack-builder and @nuxt/webpack-builder.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@nuxt/rspack-builder` | npm | From 3.12.2 | 3.15.3 |
| `@nuxt/rspack-builder` | npm | From 3.12.2 | 3.15.3 |
| `@nuxt/webpack-builder` | npm | From 3.0.0 | 3.15.3 |
| `@nuxt/webpack-builder` | npm | From 3.0.0 | 3.15.3 |

## How do I fix CVE-2025-24361?

Upgrade @nuxt/rspack-builder to 3.15.3 or later.

## Is CVE-2025-24361 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-24361 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-24361 and fix it if it is affected.

What it is: CVE-2025-24361 is a medium-severity vulnerability in nuxt, published on 25 Jan 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-24361 exists.

Affected packages and fixed versions:
- @nuxt/rspack-builder (npm): affected from 3.12.2; fixed in 3.15.3
- @nuxt/rspack-builder (npm): affected from 3.12.2; fixed in 3.15.3
- @nuxt/webpack-builder (npm): affected from 3.0.0; fixed in 3.15.3
- @nuxt/webpack-builder (npm): affected from 3.0.0; fixed in 3.15.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-24361/ (Markdown: https://insights.sbomify.com/CVE-2025-24361/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-24361
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-24361
- OSV: https://osv.dev/vulnerability/CVE-2025-24361

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-24361/
Summaries are generated and may contain mistakes; the official description above is the record.
