# CVE-2024-23657: Path Traversal: '../filedir' in Nuxt Devtools

> Attackers can read arbitrary files and achieve remote code execution via path traversal and missing origin checks in Nuxt Devtools.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **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:** 5 Aug 2024
- **Updated:** 8 Aug 2024
- **Also known as:** GHSA-rcvg-rgf7-pppv

## What is CVE-2024-23657?

CVE-2024-23657 is a high-severity path traversal vulnerability in nuxt, published on 5 Aug 2024. 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 a free and open-source framework to create full-stack web applications and websites with Vue.js. Nuxt Devtools is missing authentication on the `getTextAssetContent` RPC function which is vulnerable to path traversal.  Combined with a lack of Origin checks on the WebSocket handler,  an attacker is able to interact with a locally running devtools instance and exfiltrate data abusing this vulnerability. In certain configurations an attacker could leak the devtools authentication token and then abuse other RPC functions to achieve RCE. The `getTextAssetContent` function does not check for path traversals, this could allow an attacker to read arbitrary files over the RPC WebSocket. The WebSocket server does not check the origin of the request leading to cross-site-websocket-hijacking. This may be intentional to allow certain configurations to work correctly. Nuxt Devtools authentication tokens are placed within the home directory of the current user. The malicious webpage can connect to the Devtools WebSocket, perform a directory traversal brute force to find the authentication token, then use the *authenticated* `writeStaticAssets` function to create a new Component, Nitro Handler or `app.vue` file which will run automatically as the file is changed. This vulnerability has been addressed in release version 1.3.9. All users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-24 (Path Traversal: '../filedir'), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2024-23657?

2 open source packages ship an affected version, including @nuxt/devtools. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@nuxt/devtools` | npm | All versions | 1.3.9 |
| `@nuxt/devtools` | npm | All versions | 1.3.9 |

Products: Nuxt Nuxt.

## How do I fix CVE-2024-23657?

Upgrade @nuxt/devtools to 1.3.9 or later.

## Is CVE-2024-23657 being exploited?

There is no known exploitation of CVE-2024-23657 in the wild and no public exploit code.

## Other vulnerabilities in nuxt

- [CVE-2026-53721](https://insights.sbomify.com/CVE-2026-53721/): Nuxt: Route-rule middleware bypass via case-sensitivity mismatch between vue-router and the routeRules matcher (high 8.8)
- [CVE-2024-34344](https://insights.sbomify.com/CVE-2024-34344/): Remote code execution via the browser when running the test locally in nuxt (high 8.8)
- [CVE-2024-42352](https://insights.sbomify.com/CVE-2024-42352/): Server-Side Request Forgery (SSRF) in nuxt-icon (high 8.6)
- [CVE-2023-3224](https://insights.sbomify.com/CVE-2023-3224/): Code Injection in nuxt/nuxt (high 8.1)
- [CVE-2025-27415](https://insights.sbomify.com/CVE-2025-27415/): Nuxt allows DOS via cache poisoning with payload rendering response (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-23657 and fix it if it is affected.

What it is: CVE-2024-23657 is a high-severity path traversal vulnerability in nuxt, published on 5 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2024-23657 in the wild and no public exploit code.

Affected packages and fixed versions:
- @nuxt/devtools (npm): affected all versions; fixed in 1.3.9
- @nuxt/devtools (npm): affected all versions; fixed in 1.3.9

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-2024-23657/ (Markdown: https://insights.sbomify.com/CVE-2024-23657/index.md)
```

## Sources

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

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