Repository navigation
chore(deps): update pnpm.catalog.default @nuxt/schema to v4.6.4 [security] - #234
Merged
Merged
Conversation
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.6.3→4.6.4Nuxt dev server serves files from a parent directory with a stray lockfile or workspace file
CVE-2026-128070 / GHSA-mjrq-cffv-q4qc
More information
Details
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 apnpm-workspace.yamlordeno.jsonfile, even one that only holds settings. The Vite dev server allows/_nuxt/@fs/requests for any file underworkspaceDir. 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:
package-lock.json,pnpm-lock.yaml,yarn.lock,bun.lockand similar), while the project is not inside a git repository and has no workspace file (pnpm-workspace.yaml,turbo.json,lerna.jsonand similar) above it. Runningnpm installonce in the home directory is enough to create one there.pnpm-workspace.yamlwithout apackageslist (for example one that only holds pnpm settings such asonlyBuiltDependencies), or adeno.jsonordeno.jsoncwithout aworkspacefield. This applies even if the project is inside a git repository.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.jsonand a project at~/projects/appthat has no.gitdirectory,nuxt dev --hostservesGET /_nuxt/@fs/<home>/.ssh/id_ed25519with status 200. Any file in the home directory that is not covered by Vite'sserver.fs.denylist 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/schema4.6.4, whichnuxt4.6.4 depends on. A parent directory now only becomes the defaultworkspaceDirif it declares a workspace: apnpm-workspace.yamlwithpackages, adeno.jsonordeno.jsoncwithworkspace, alerna.json,turbo.jsonorrush.json, apackage.jsonwithworkspaces, or a git repository. A lockfile or a settings file alone no longer widens the dev server'sserver.fs.allowlist. If your monorepo root is not detected this way, setworkspaceDirinnuxt.config.ts. Nuxt 3 has reached end of life and will not receive a fix.Workarounds
Set
workspaceDirexplicitly innuxt.config.tsto 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 for the report.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
nuxt/nuxt (@nuxt/schema)
v4.6.4Compare Source
These probably won't affect most apps, but it's worth flagging anyway:
createError. Everything else is stripped.Hostchecks. Webpack and rspack dev servers now reject requests with an unexpectedHostheader, as Vite already does. If you use a custom hostname or tunnel, you'll need to add it to the newdevServer.allowedHostsoption.workspaceDirdetection. WhenworkspaceDirisn't set, Nuxt now only widens it pastrootDirto an explicit workspace root or the closest git repository.cache,swrandisrroute rules now only cacheGETandHEADrequests, and no longer store responses that set a cookie or sendCache-Control: privateorno-store. Wildcardproxyandredirectrules also reject requests whose resolved target would leave the rule's scope./api%2Fadminis covered by a/api/**rule.👉 Changelog
compare changes
🩹 Fixes
768d21368)bf31e4cd8)1b13c6981)75c12c6fb)6f1b93c64)1e7dfa6a7)8c56b71e4)97424dd21)8c11d965d)3c9645326)f8d64c9aa)devServer.allowedHosts(3e1c7964e)084396b10)89d3306d1)x-forwarded-protoin when opted-in (#36818)nuxt/serverhandler (#36817)24d75659d)definePageMeta(#36751)📖 Documentation
1225ca7ff)🏡 Chore
c852d871f)✅ Tests
7528c3ce6)545b5934c)40f72b40b)861e153dd)🤖 CI
d093c88b1)4b90681bd)6428070e0)bc17c03d1)❤️ Contributors
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.