CVE-2025-24360: @nuxt/vite builder Opening A Malicious Website While Vulnerability

MODERATE
Advisory Identifier: GHSA-2452-6xj8-jh47
CVSS 5.3
CWE-200
Published
Advisory Summary

CVE-2025-24360 is a MODERATE (CVSS 5.3) opening a malicious website while vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting @nuxt/vite builder libraries in the npm ecosystem. The issue involves opening a malicious website while running a nuxt dev server could allow read-only access to code. Remediation is available by upgrading affected packages to version 3.15.3.

CVE-2025-24360 at a Glance

CVE Identifier CVE-2025-24360
GHSA Identifier GHSA-2452-6xj8-jh47
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product @nuxt/vite builder
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2025-24360

To remediate this vulnerability, upgrade all affected @nuxt/vite builder dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@nuxt/vite-builder fixed: 3.15.3
npm install @nuxt/vite-builder@3.15.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @nuxt/vite-builder

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-24360, inspect your project dependencies using npm:

npm ls @nuxt/vite-builder

Analyze the terminal output to locate any version of @nuxt/vite builder in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.15.3), your application is affected.

Note: The npm ls @nuxt/vite-builder command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In @nuxt/vite builder, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Nuxt allows any websites to send any requests to the development server and read the response due to default CORS settings. ### Details While Vite patched the default CORS settings to fix https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6, nuxt uses its own CORS handler by default (https://github.com/nuxt/nuxt/pull/23995). https://github.com/nuxt/nuxt/blob/7d345c71462d90187fd09c96c7692f306c90def5/packages/vite/src/client.ts#L257-L263 That CORS handler sets `Access-Control-Allow-Origin: *`. > [!IMPORTANT] > If on an affected version, it may be possible to opt-out of the default Nuxt CORS handler by configuring `vite.server.cors`. ### PoC 1. Start a dev server in any nuxt project using Vite by `nuxt dev`. 2. Send a fetch request to `http://localhost:3000/_nuxt/app.vue` (`fetch('http://localhost:3000/_nuxt/app.vue')`) from a different origin page. ### Impact Users with the default server.cors option using Vite builder may get the source code stolen by malicious websites ### Additional Information `/__nuxt_vite_node__/manifest` / `/__nuxt_vite_node__/module` also seems to have `Access-Control-Allow-Origin: *`, so it maybe also possible to exploit that handler. https://github.com/nuxt/nuxt/blob/7d345c71462d90187fd09c96c7692f306c90def5/packages/vite/src/vite-node.ts#L39 Although I didn't find a valid module id. Note that this handler is probably also vulnerable to DNS rebinding attacks as I didn't find any host header checks.

CVE-2025-24360 Affected @nuxt/vite builder Versions

1 component(s)
Fixed Versions:
3.15.3
Product / Package Ecosystem Affected Versions Fixed Version
@nuxt/vite-builder
npm
≥ 3.8.1
< 3.15.3
3.15.3

References

Frequently Asked Questions

What is CVE-2025-24360?
CVE-2025-24360 is a security vulnerability in @nuxt/vite builder involving Opening a malicious website while running a Nuxt dev server could allow read-only access to code under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which @nuxt/vite builder versions are affected?
Affected versions include releases prior to 3.15.3 across affected packages: @nuxt/vite-builder.
What version fixes CVE-2025-24360?
Upgrading to 3.15.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @nuxt/vite-builder affected?
Yes, @nuxt/vite-builder is affected in releases prior to 3.15.3. Upgrade your dependency to 3.15.3 or later.
What is the CVSS score of CVE-2025-24360?
CVE-2025-24360 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2025-24360?
CVE-2025-24360 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check npm dependencies for CVE-2025-24360?
Run the dependency tree command: 'npm ls @nuxt/vite-builder'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2452-6xj8-jh47",
  "modified" : "2025-01-27T11:31:15Z",
  "published" : "2025-01-27T11:31:14Z",
  "aliases" : [ "CVE-2025-24360" ],
  "summary" : "Opening a malicious website while running a Nuxt dev server could allow read-only access to code",
  "details" : "### Summary\nNuxt allows any websites to send any requests to the development server and read the response due to default CORS settings.\n\n### Details\nWhile Vite patched the default CORS settings to fix https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6, nuxt uses its own CORS handler by default (https://github.com/nuxt/nuxt/pull/23995).\n\nhttps://github.com/nuxt/nuxt/blob/7d345c71462d90187fd09c96c7692f306c90def5/packages/vite/src/client.ts#L257-L263\n\nThat CORS handler sets `Access-Control-Allow-Origin: *`.\n\n> [!IMPORTANT]  \n> If on an affected version, it may be possible to opt-out of the default Nuxt CORS handler by configuring `vite.server.cors`.\n\n### PoC\n1. Start a dev server in any nuxt project using Vite by `nuxt dev`.\n2. Send a fetch request to `http://localhost:3000/_nuxt/app.vue` (`fetch('http://localhost:3000/_nuxt/app.vue')`) from a different origin page.\n\n### Impact\nUsers with the default server.cors option using Vite builder may get the source code stolen by malicious websites\n\n### Additional Information\n`/__nuxt_vite_node__/manifest` / `/__nuxt_vite_node__/module` also seems to have `Access-Control-Allow-Origin: *`, so it maybe also possible to exploit that handler.\nhttps://github.com/nuxt/nuxt/blob/7d345c71462d90187fd09c96c7692f306c90def5/packages/vite/src/vite-node.ts#L39\nAlthough I didn't find a valid module id.\nNote that this handler is probably also vulnerable to DNS rebinding attacks as I didn't find any host header checks.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@nuxt/vite-builder"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.8.1"
      }, {
        "fixed" : "3.15.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nuxt/nuxt/security/advisories/GHSA-2452-6xj8-jh47"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-24360"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nuxt/nuxt/pull/23995"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nuxt/nuxt/commit/7eeb910bf4accb1e0193b9178c746f06ad3dd88f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nuxt/nuxt"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nuxt/nuxt/blob/7d345c71462d90187fd09c96c7692f306c90def5/packages/vite/src/client.ts#L257-L263"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nuxt/nuxt/blob/7d345c71462d90187fd09c96c7692f306c90def5/packages/vite/src/vite-node.ts#L39"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-27T11:31:14Z",
    "nvd_published_at" : "2025-01-25T01:15:24Z"
  }
}