Skip to content
Server Security Center
KEVmedium5.3

CVE-2025-31125: Vite Vitejs Improper Access Control

Vitejs · listed in the CISA catalog of actively exploited vulnerabilities since 2026-01-22.

CVSS v3.1 (CVE record)
5.3
medium
EPSS (exploit probability, 30 days)
75%
higher than 99.5% of all CVEs
Added to CISA KEV
2026-01-22
US federal due date 2026-02-12
Automatable (CISA SSVC)
no
technical impact: total

CVE-2025-31125 explained

CVE-2025-31125 is an improper access control flaw in Vite (Vitejs), a frontend tooling framework for JavaScript. The Vite dev server can expose the content of non-allowed files through certain import query parameters. CISA lists it as known to be exploited, so teams running network-exposed dev servers should act quickly.

Impact

An attacker who can reach the Vite dev server over the network can read files the server should not serve, leading to disclosure of sensitive information. Only apps that explicitly expose the dev server to the network, using --host or the server.host config option, are affected. Exploitation needs high attack complexity and user interaction. CISA rates technical impact as total but not automatable, and lists the flaw as known to be exploited.

Who is affected

The CVE record lists vitejs vite entries < 4.5.11, 5.0.0, < 5.4.16, 6.0.0, < 6.0.13, 6.1.0, < 6.1.3 and 6.2.0, plus one more item shown on the page. The structured record names no fixed version, but the description states the issue is fixed in 6.2.4, 6.1.3, 6.0.13, 5.4.16 and 4.5.11.

Written with AI from the data on this page and checked against it automatically.

Official description

Vite is a frontend tooling framework for javascript. Vite exposes content of non-allowed files using ?inline&import or ?raw?import. Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.

This vulnerability is fixed in 6.2.4, 6.1.3, 6.0.13, 5.4.16, and 4.5.11.

CISA required action: Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.

CISA notes

Affected and fixed versions

From the CVE record published by the vendor or CVE numbering authority.

  • vitejs vite
    Affected
    • < 4.5.11
    • 5.0.0
    • < 5.4.16
    • 6.0.0
    • < 6.0.13
    • 6.1.0
    • < 6.1.3
    • 6.2.0
    • < 6.2.4
    Fixed in
    not stated

How to fix it

  • The CVE record names no fixed version – check the vendor advisory and CISA's required action for updates and mitigations.
  • Vendor advisory: github.com/vitejs/vite/commit/5967313…
  • CISA's deadline for US federal agencies: 2026-02-12 (passed) – a useful benchmark for everyone else, too.

What to do

  1. Upgrade Vite to 6.2.4, 6.1.3, 6.0.13, 5.4.16 or 4.5.11, matching your release branch, as stated in the description.
  2. Do not expose the Vite dev server to the network; avoid --host and the server.host option unless strictly needed.
  3. Follow the vendor advisory and apply its mitigations, as CISA's required action directs.
  4. Review dev server access and check whether sensitive files may have been read.

The structured CVE record lists no fixed version, though the description names fixed releases. Confirm the right version in the vendor advisory. Until upgraded, keep the dev server off the network and follow CISA's required action: apply vendor mitigations, follow BOD 22-01 guidance for cloud services, or discontinue use if mitigations are unavailable.

Written with AI from the data on this page and checked against it automatically.

CISA's assessment (SSVC)

Exploitation
Exploited in the wild
Automatable
No – each attack needs manual steps
Technical impact
Total – full control of the component or total information disclosure

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

Questions about CVE-2025-31125

Am I affected if I only run Vite locally?
According to the description, only apps that explicitly expose the Vite dev server to the network, using --host or the server.host config option, are affected.
Is this vulnerability exploited in practice?
Yes. CISA added CVE-2025-31125 to its Known Exploited Vulnerabilities catalog on 2026-01-22, with a US federal due date of 2026-02-12. Ransomware use is unknown.
What can an attacker obtain?
The attacker can read the content of files the dev server should not serve. The impact is on confidentiality only; integrity and availability are not affected.

Written with AI from the data on this page and checked against it automatically.

References

Data: CISA Known Exploited Vulnerabilities (public domain) · CVE Program records incl. CISA ADP enrichment · OSV.dev (CC BY 4.0) incl. Ubuntu and Debian security data · FIRST EPSS · endoflife.date. Updated automatically – facts last changed 2026-11-21. Always confirm with the vendor's or distribution's advisory before patching.