Skip to content
RedCVE

CVE-2025-31125Vite dev server access control flaw exposes non-allowed files

ExploitedvitejsPublished:

CVSS score

7.5

High

CVSS 3.1 from NVD

Exploit probability (EPSS)

74.9%

74.9% chance of exploitation in the next 30 days, higher than 99.5% of all CVEs.

CISA KEV

Actively exploited

Added to KEV on 22 Jan 2026.

US federal deadline to fix: 12 Feb 2026.

In plain words

An unauthenticated attacker on the network can read the contents of files that Vite should not serve, using crafted ?inline&import or ?raw?import query parameters. Only Vite dev servers deliberately exposed to the network with --host or server.host are affected, in versions before 4.5.11, 5.0.0 to 5.4.15, and 6.0.0 to 6.0.12. CISA reports this flaw is being exploited in the wild, so update to a fixed release (6.2.4, 6.1.3, 6.0.13, 5.4.16 or 4.5.11) or stop exposing the dev server.

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.

Source: NVD · CNA: security-advisories@github.com

How to fix it, step by step

  1. Treat it as urgent

    Attackers are already exploiting this flaw: CISA added it to its Known Exploited Vulnerabilities list on 22 Jan 2026.

    US federal agencies must fix it by 12 Feb 2026. It's a sensible deadline for everyone else too.

    CISA's full instruction
    Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
  2. Check whether you're affected

    Find every system running vitejs Vite and compare its version with the affected versions.

  3. Update to a fixed version

    • Update Vite to 4.5.11, 5.4.16, 6.0.13, 6.1.3 or later, on the branch you run.
  4. If you can't update right away

  5. Check for signs of compromise

    Updating closes the flaw but doesn't remove an attacker who got in earlier. Review affected systems for unknown accounts, unusual logins and configuration changes, and use any indicators of compromise the vendor or CISA publish.

  6. Confirm the fix

    Check that every affected system now reports a fixed version, and recheck the vendor's advisory: fixes are sometimes revised.

Was this useful?

How it can be exploited

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Values in red make the vulnerability easier to exploit or more damaging. CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected products

Affected productsVersions
vitejs Vite< 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 · >= 6.2.0, < 6.2.4

Weakness

Timeline

  1. Published:
  2. Added to CISA KEV:
  3. Last modified:

Frequently asked questions

Is CVE-2025-31125 being exploited?

Yes. CISA added CVE-2025-31125 to its Known Exploited Vulnerabilities catalog on 22 Jan 2026, which means there is evidence of exploitation in the wild. Its EPSS score estimates a 74.9% probability of exploitation in the next 30 days.

What is the CVSS score of CVE-2025-31125?

CVE-2025-31125 has a CVSS 3.1 base score of 7.5 (high).

Which versions are affected?

Vitejs Vite (< 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; >= 6.2.0, < 6.2.4)

Is there a patch for CVE-2025-31125?

The official record links to vendor advisories or patches; see “What to do” above.

References

Data: NVD, CVE.org (cvelistV5), CISA KEV and FIRST EPSS. Summary written by RedCVE with AI assistance from the official data.