Skip to content

← Actionable
Medium, CVSS 5.3Exploited · CISA KEVamended

Vite has a server.fs.deny bypassed for inline and raw with ?import query

CVE-2025-31125GHSA-4r4m-qw57-chr8

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (vite 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm vite

    Affected
    >= 6.2.0, < 6.2.4>= 6.1.0, < 6.1.3>= 6.0.0, < 6.0.13>= 5.0.0, < 5.4.16< 4.5.11
    Fixed in
    6.1.3, 5.4.16, 6.0.13, 6.2.4, 4.5.11

Sources

Severity and exploitation
Exploitation
Confirmed: listed in the CISA Known Exploited Vulnerabilities catalog.
CVSS
5.3 · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
EPSS
  • CVE-2025-31125: 74.94% estimated exploitation activity in the next 30 days; percentile 99.51 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary The contents of arbitrary files can be returned to the browser. Impact Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected. Details - base64 encoded content of non-allowed files is exposed using ?inline&import (originally reported as ?import&?inline=1.wasm?init) - content of non-allowed files is exposed using ?raw?import /@fs/ isn't needed to reproduce the issue for files inside the project root. PoC Original report (check details above for simplified cases): The ?import&?inline=1.wasm?init ending allows attackers to read arbitrary files and returns the file content if it exists. Base64 decoding needs to be performed twice Example full URL http://localhost:5173/@fs/C:/windows/win.ini?import&?inline=1.wasm?init

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from ghsa record GHSA-4r4m-qw57-chr8

  2. Revision 2 · evidence added ·

    CISA KEV confirmed exploitation for CVE-2025-31125 (date added 2026-01-22). Customer workflow unchanged.

  3. Revision 1 · created ·

    Published from osv record GHSA-4r4m-qw57-chr8

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2025-31125

Advisory: Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
IDs: CVE-2025-31125, GHSA-4r4m-qw57-chr8
Record: https://patchnext.com/advisories/cve-2025-31125 (revision 3, source checked 26 Oct 2026, 12:41 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 5.3)
Exploitation: confirmed: listed in the CISA Known Exploited Vulnerabilities catalog.
Vendor response: Vendor fix available; fixed versions by package: vite 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm vite: affected >= 6.2.0, < 6.2.4; >= 6.1.0, < 6.1.3; >= 6.0.0, < 6.0.13; >= 5.0.0, < 5.4.16; < 4.5.11; fixed in 6.1.3, 5.4.16, 6.0.13, 6.2.4, 4.5.11

## Suggested inspection (read-only)
- `npm ls vite --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on vite.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-4r4m-qw57-chr8 (OSV record GHSA-4r4m-qw57-chr8 lists affected ranges: npm vite >=6.2.0 =6.1.0 =6.0.0 =5.0.0 =0 <4.5.11 (fixed))
- Verified: https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json (CISA added CVE-2025-31125 to the Known Exploited Vulnerabilities catalog on 2026-01-22.)
- Verified: https://github.com/advisories/GHSA-4r4m-qw57-chr8 (GitHub-reviewed advisory GHSA-4r4m-qw57-chr8 lists affected ranges: npm vite >=6.2.0 =6.1.0 =6.0.0 =5.0.0 =0 <4.5.11)
- Verified: https://www.cisa.gov/known-exploited-vulnerabilities-catalog (CISA added CVE-2025-31125 to the Known Exploited Vulnerabilities catalog on 2026-01-22.)

Commands are suggestions: review each one before running it.

Loading voting…