CVE-2026-119199: Nuxt dev server exposes private runtime config through the Nitro dev bundle

Published Oct 29, 2026
·
Updated

Summary

With Nitro 2 (the default server engine in Nuxt 3 and Nuxt 4), the Nitro development server bundle written by nuxt dev can be fetched through the Vite dev server. Nitro inlines the resolved runtimeConfig into that bundle, so private runtime config values that were resolved at build time can be read by anyone with HTTP access to the dev server.

Impact

nuxt dev writes the Nitro development server bundle to <buildDir>/dev/index.mjs (by default .nuxt/dev/index.mjs). The build directory is inside the directories Nuxt passes to Vite's server.fs.allow, so the bundle is served by the dev server:

bash curl http://<dev-server>/nuxt/@fs/<absolute-path-to-project>/.nuxt/dev/index.mjs

The response contains every private (non-public) runtime config value that was resolved at build time. That includes values set in nuxt.config, such as a secret read from .env:

ts export default defineNuxtConfig({ runtimeConfig: { apiSecret: process.env.APISECRET, }, })

From Nuxt 4.6.0, it also includes the generated development appSecret. Vite's default deny list blocks .env itself, but not the bundle containing values read from it.

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). As far as we can tell, 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 are not affected, because the Vite dev server is not used and the server bundle is not served. Nuxt projects using Nitro 3 do not write the server bundle to disk in development and are not affected. Private runtime config values that are left empty in nuxt.config and supplied through NUXT environment variables are applied when the server starts, are not inlined into the bundle, and are not exposed.

Patches

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

Nuxt 3 has reached end of life and will not receive a fix.

Workarounds

Avoid exposing the dev server to untrusted networks. Alternatively, set private runtime config keys to an empty default in nuxt.config and provide their values with the matching NUXT environment variables (for example runtimeConfig: { apiSecret: '' } with NUXTAPISECRET in .env).

If a dev server has been reachable by untrusted clients, rotate any credentials that were set through runtimeConfig in nuxt.config.

Other sources

Nuxt is an open-source web development framework for Vue.js. From 3.0.0 until 4.6.3, the Nuxt development server can expose the Nitro 2 development bundle at <buildDir>/dev/index.mjs through Vite file serving when the server is reachable over HTTP. Nitro inlines private runtimeConfig values resolved at build time into that bundle, including secrets configured in nuxt.config, and Nuxt 4.6.0 and later also inline the generated development appSecret. The default localhost binding limits remote exposure, production builds and Nitro 3 are not affected, and runtime configuration supplied only through NUXT environment variables at server startup is not inlined. This issue is fixed in version 4.6.3.

— OSV

Affected Software

1 affected componentFixes available
npm/@nuxt/vite-builder>=3.0.0<4.6.3
4.6.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@nuxt/vite-builder to a version that resolves this vulnerability.

    Fixed in 4.6.3
  2. Upgrade

    Upgrade @nuxt/vite-builder to a version that resolves this vulnerability.

    Fixed in 4.6.3
  3. Configuration

    Set private runtime config keys to empty defaults in nuxt.config, such as runtimeConfig: { apiSecret: '' }, and provide their values through matching NUXT_* environment variables.

    Nuxt runtimeConfig Private runtimeConfig keys = Empty defaults in nuxt.config; provide values through matching NUXT_* environment variables
  4. Compensating control

    Avoid exposing the Nuxt development server to untrusted networks; restrict direct HTTP access to the dev server.

  5. Operational

    If the dev server was reachable by untrusted clients, rotate any credentials that were set through runtimeConfig in nuxt.config.

Event History

Oct 29, 2026
CVE Published
via MITRE·08:14 PM
Data Sourced
via MITRE·08:14 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:17 PM
DescriptionSeverityWeakness
Oct 30, 2026
Advisory Published
via GitHub·11:00 PM
Data Sourced
via GitHub·11:00 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·11:00 PM
Affected Software

Frequently Asked Questions

1

Who can retrieve the exposed values?

Anyone with HTTP access to the Nuxt development server can fetch the Nitro development bundle through the Vite dev server. The issue concerns instances run with `nuxt dev`.

2

What information can be disclosed?

The bundle contains every private, non-public runtime configuration value resolved at build time. This can include secrets read from environment variables and assigned in `nuxt.config`; Nuxt 4.6.0 and later also include the generated development `appSecret`.

3

How can I check whether a development server is exposing its configuration?

The development bundle is written by default to `.nuxt/dev/index.mjs` and can be requested through the Vite `@fs` path, for example `/_nuxt/@fs/<absolute-path-to-project>/.nuxt/dev/index.mjs`. A response containing resolved private runtime configuration indicates exposure.

4

Is the default development layout affected?

Yes. By default, the build directory is `.nuxt`, and Nuxt includes it in Vite's `server.fs.allow` directories, allowing the development bundle to be served. Vite's default deny list blocks the `.env` file itself but does not block the bundle containing values read from it.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203