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

CVE-2025-31486: Vite allows server.fs.deny to be bypassed with .svg or relative paths

April 4, 2025 (updated April 30, 2025)

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

References

  • github.com/advisories/GHSA-xcj6-pq6g-qj4x
  • github.com/vitejs/vite
  • github.com/vitejs/vite/blob/037f801075ec35bb6e52145d659f71a23813c48f/packages/vite/src/node/plugins/asset.ts
  • github.com/vitejs/vite/commit/62d7e81ee189d65899bb65f3263ddbd85247b647
  • github.com/vitejs/vite/security/advisories/GHSA-xcj6-pq6g-qj4x
  • nvd.nist.gov/vuln/detail/CVE-2025-31486

Code Behaviors & Features

Detect and mitigate CVE-2025-31486 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.12, all versions starting from 5.0.0 before 5.4.17, all versions starting from 6.0.0 before 6.0.14, all versions starting from 6.1.0 before 6.1.4, all versions starting from 6.2.0 before 6.2.5

Fixed versions

  • 6.2.5
  • 6.1.4
  • 6.0.14
  • 5.4.17
  • 4.5.12

Solution

Upgrade to versions 4.5.12, 5.4.17, 6.0.14, 6.1.4, 6.2.5 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-31486.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Wed, 14 May 2025 12:15:01 +0000.