CVE-2025-24360: Nuxt @nuxt/vite-builder permissive CORS policy in development server

CVE-2025-24360 · Severity: low · CVSS 3.1 · Published 2025-01-27

Nuxt is a popular web development framework. A security issue in its development server allows malicious websites to bypass security restrictions and read the source code of a project while a developer is working on it. This could lead to the exposure of sensitive intellectual property or application logic if a developer visits a compromised site while their local development environment is active.

Technologies: @nuxt/vite-builder (npm). Vendors: npm, Nuxt.

Quick answers

Is CVE-2025-24360 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-24360 being exploited in the wild.
How severe is CVE-2025-24360?
Low severity, with a CVSS score of 3.1, published 27 January 2025.
Which products and versions are affected?
@nuxt/vite-builder (npm) SEMVER:introduced=3.8.1,fixed=3.15.3; Nuxt Vite-Builder >=3.8.1, <3.15.3.
Is there a fix for CVE-2025-24360?
Yes. @nuxt/vite-builder (npm): upgrade to 3.15.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2025-24360 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2025-24360?
Check whether you run @nuxt/vite-builder (npm) or Nuxt Vite-Builder at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @nuxt/vite-builder (npm): upgrade to 3.15.3 or later
    npm install @nuxt/vite-builder@3.15.3

Technical details

The Nuxt development server, specifically when using the @nuxt/vite-builder, implements a custom CORS handler that defaults to 'Access-Control-Allow-Origin: *'. This configuration allows any external origin to perform fetch requests against the local development server (typically localhost:3000). An attacker can exploit this by tricking a developer into visiting a malicious website, which then uses JavaScript to read source files (e.g., app.vue) or manifest data from the dev server. The vulnerability is also potentially susceptible to DNS rebinding due to a lack of Host header validation. The issue is fixed in version 3.15.3; users on older versions can mitigate the risk by manually configuring 'vite.server.cors' to a restrictive value.

Affected products

  • Nuxt @nuxt/vite-builder >=3.8.1, <3.15.3

Identifiers

  • CVE-2025-24360
  • GHSA-2452-6xj8-jh47

Timeline

  • 2023-10-28: other: Vulnerable CORS handler introduced in PR #23995
  • 2025-01-24: advisory: GitHub Advisory published
  • 2025-01-25: other: NVD published date
  • 2025-01-27: patched: Fix released in version 3.15.3

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.