Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. vite
  4. ›
  5. CVE-2025-31125

CVE-2025-31125: Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query

March 31, 2025

The contents of arbitrary files can be returned to the browser.

References

  • github.com/advisories/GHSA-4r4m-qw57-chr8
  • github.com/vitejs/vite
  • github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949
  • github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8
  • nvd.nist.gov/vuln/detail/CVE-2025-31125

Code Behaviors & Features

Detect and mitigate CVE-2025-31125 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.5.11, all versions starting from 5.0.0 before 5.4.16, all versions starting from 6.0.0 before 6.0.13, all versions starting from 6.1.0 before 6.1.3, all versions starting from 6.2.0 before 6.2.4

Fixed versions

  • 6.2.4
  • 6.1.3
  • 6.0.13
  • 5.4.16
  • 4.5.11

Solution

Upgrade to versions 4.5.11, 5.4.16, 6.0.13, 6.1.3, 6.2.4 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-284: Improper Access Control

Source file

npm/vite/CVE-2025-31125.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 13 May 2025 00:15:31 +0000.