Medium

Nuxt dev server exposes generated appSecret through Vite file serving

  • Disclosed: 30.10.2026
  • Updated: 31.10.2026 01:17

Impact

When no appSecret is configured (via NUXT_APP_SECRET, NITRO_APP_SECRET or runtimeConfig.appSecret), nuxt dev generates a development secret and stores it in <buildDir>/app-secret (by default .nuxt/app-secret). The build directory is inside the directories that Nuxt passes to Vite's server.fs.allow, so the file can be fetched from the dev server:

bash
curl http://<dev-server>/_nuxt/@fs/<absolute-path-to-project>/.nuxt/app-secret

Anyone who can read it can compute every secret derived from it with deriveSecret(), including the default password used by useSession, and so can forge session cookies accepted by that dev server.

Exploitation requires direct HTTP access to the dev server. nuxt dev listens on localhost by default, so this mainly affects dev servers that are exposed to a network (for example with --host, a published container port or a tunnel). A malicious website cannot read the file through a developer's browser: Vite's CORS and host checks prevent pages on other origins from reading the response.

Production builds never generate an appSecret and are not affected. Dev servers with an explicitly configured appSecret do not use the generated file.

Patches

Fixed in @nuxt/vite-builder 4.6.3, which nuxt 4.6.3 depends on. The dev server now adds app-secret to Vite's server.fs.deny, keeping Vite's default deny list.

Workarounds

Set NUXT_APP_SECRET in .env to a random value of at least 32 characters (for example the output of openssl rand -base64 32), or avoid exposing the dev server to untrusted networks.

If a dev server using a generated secret has been reachable by untrusted clients, delete .nuxt/app-secret (a new secret is generated on the next nuxt dev) or set NUXT_APP_SECRET. Either invalidates existing dev sessions.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package @nuxt/vite-builder >= 4.6.0, < 4.6.3 4.6.3

References

CVSS score 4.8/10
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Weakness (CWE)
CWE-552
Platform
npm
Package
@nuxt/vite-builder
Disclosed
30.10.2026
Updated
31.10.2026 01:17

Sources and licenses

OSV / GitHub Advisory Database - GHSA-3xf4-9g3c-4h4w - CC BY 4.0

Vulnerability history: @nuxt/vite-builder

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
4
First → latest
01.2025 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Medium 4

Disclosures per year

  1. 2025: 1
  2. 2026: 3
  1. Nuxt dev server exposes generated appSecret through Vite file serving this entry
    Medium · 4.8 CVE-2026-119201 >= 4.6.0, < 4.6.3 4.6.3
  2. Medium · 5.9 CVE-2026-119198 >= 4.6.0, < 4.6.3 4.6.3
  3. Medium · 5.9 CVE-2026-119199 >= 3.0.0, < 4.6.3 4.6.3

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.