MEDIUM · CVSS 3.1 5.9 EPSS 0.4% · 37th percentile CWE-552

CVE-2026-128070: Nuxt dev server serves files from a parent directory with a stray lockfile or workspace file

Published 2026-11-13 · Updated 2026-11-13 · Also known as GHSA-mjrq-cffv-q4qc

Summary

Nuxt incorrectly identifies parent directories as workspace roots due to the presence of stray configuration or lockfiles, enabling unauthorized file access via the Vite dev server. Developers using affected versions of @nuxt/schema should update to version 4.6.4 or explicitly define their workspace directory.

Who is affected

This vulnerability only affects the Nuxt development server and is not present in production builds. Exploitation requires specific environmental conditions, such as the existence of a stray lockfile or configuration file in a parent directory and the dev server being exposed to an untrusted network.

Exploitability

The vulnerability carries a CVSS 3.1 base score of 5.9, reflecting a medium severity risk with low complexity for network-based attacks. The low EPSS score of 0.004 indicates a low current probability of widespread exploitation, and it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
npm @nuxt/schema >= 3.5.0, < 4.6.4 4.6.4 npm install @nuxt/[email protected]

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Attack vectorNetwork
Attack complexityHigh
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityNone
AvailabilityNone

FAQ

Does this affect my production deployment?

No, this vulnerability is limited to the Nuxt development server and does not impact production-built applications.

What happens if I cannot update to 4.6.4?

You should manually set 'workspaceDir' in your 'nuxt.config.ts' to point to your actual project root, ensuring the server does not improperly expand its file access scope.

Are Nuxt 3 projects supported?

No, Nuxt 3 has reached its end of life and will not receive a patch for this vulnerability.

Original advisory description
### Summary Nuxt can pick a parent directory that does not declare a workspace as its default `workspaceDir`: the farthest directory with a lockfile when the project is not inside a git repository, or the farthest directory with a `pnpm-workspace.yaml` or `deno.json` file, even one that only holds settings. The Vite dev server allows `/_nuxt/@fs/` requests for any file under `workspaceDir`. A stray lockfile or settings file in a parent directory, such as the home directory, therefore lets anyone who can reach the dev server read files in that directory and everything below it. ### Impact This affects the development server only; production builds are not affected. All of the following have to hold: - A parent directory contains either: - a lockfile (`package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `bun.lock` and similar), while the project is not inside a git repository and has no workspace file (`pnpm-workspace.yaml`, `turbo.json`, `lerna.json` and similar) above it. Running `npm install` once in the home directory is enough to create one there. - a `pnpm-workspace.yaml` without a `packages` list (for example one that only holds pnpm settings such as `onlyBuiltDependencies`), or a `deno.json` or `deno.jsonc` without a `workspace` field. This applies even if the project is inside a git repository. - The dev server is reachable from the network (`nuxt dev --host`, `nuxt dev --tunnel`, a published container port, or a proxy onto the dev port). The default localhost bind limits this to local processes, which can usually read the same files directly. For example, with `~/package-lock.json` and a project at `~/projects/app` that has no `.git` directory, `nuxt dev --host` serves `GET /_nuxt/@fs/<home>/.ssh/id_ed25519` with status 200. Any file in the home directory that is not covered by Vite's `server.fs.deny` list can be read this way, including SSH keys, cloud credentials and the Nuxt DevTools auth token in `~/.nuxt/devtools/dev-auth-token.txt`. No browser is involved: a plain HTTP client is enough. A web page on another origin cannot read the response, and DNS rebinding is rejected by Vite's host check. Projects whose parent directories contain none of these files are not affected, nor are projects inside a git repository whose only lockfile is their own. Nuxt 3.5.0 and later are affected. ### Patches Fixed in `@nuxt/schema` 4.6.4, which `nuxt` 4.6.4 depends on. A parent directory now only becomes the default `workspaceDir` if it declares a workspace: a `pnpm-workspace.yaml` with `packages`, a `deno.json` or `deno.jsonc` with `workspace`, a `lerna.json`, `turbo.json` or `rush.json`, a `package.json` with `workspaces`, or a git repository. A lockfile or a settings file alone no longer widens the dev server's `server.fs.allow` list. If your monorepo root is not detected this way, set `workspaceDir` in `nuxt.config.ts`. Nuxt 3 has reached end of life and will not receive a fix. ### Workarounds Set `workspaceDir` explicitly in `nuxt.config.ts` to the project root (or to the real monorepo root), or remove the stray lockfile or settings file from the parent directory. Do not expose the dev server to untrusted networks. If the dev port was reachable from an untrusted network while this layout was in place, treat files in the parent directory as exposed and rotate credentials such as SSH keys and cloud tokens. ### Credits Nuxt thanks [@superboy-zjc](https://github.com/superboy-zjc) for the report.

References

Source records: GHSA-mjrq-cffv-q4qc (OSV.dev) · EPSS by FIRST, 2026-11-21.