cve.bz

CVE-2025-31125 Vite Vitejs Improper Access Control Vulnerability

7.5 highKEVExploit referenceEPSS 75%Fix available

High (7.5) in Vite Vitejs. In CISA KEV since 2026-01-22. EPSS 75% estimated probability of exploitation activity in the next 30 days. Fixed in vite 4.5.11, 5.4.16, 6.0.13.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
75% (unchanged from 75% a week ago; 65% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA KEV
listed 2026-01-22, due 2026-02-12
CISA's assessment (SSVC)
Exploitation: active · Automatable: no · Technical impact: total, assessed 2026-01-23. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
CWE-284 Improper Access Control
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-31125 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-31125?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-31125?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-31125 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
vitejs:vitebefore 4.5.11
vitejs:vitefrom 5.0.0 before 5.4.16
vitejs:vitefrom 6.0.0 before 6.0.13
vitejs:vitefrom 6.1.0 before 6.1.3
vitejs:vitefrom 6.2.0 before 6.2.4

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-4r4m-qw57-chr8npmvite>=6.2.0 <6.2.46.2.4
GHSA-4r4m-qw57-chr8npmvite>=6.1.0 <6.1.36.1.3
GHSA-4r4m-qw57-chr8npmvite>=6.0.0 <6.0.136.0.13
GHSA-4r4m-qw57-chr8npmvite>=5.0.0 <5.4.165.4.16
GHSA-4r4m-qw57-chr8npmvite<4.5.114.5.11

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 2automation-controllerNot affected
Red Hat Ansible Automation Platform 2automation-eda-controllerNot affected
Red Hat Ansible Automation Platform 2automation-gatewayNot affected
Red Hat JBoss Enterprise Application Platform 8org.keycloak-keycloak-parentNot affected
Red Hat JBoss Enterprise Application Platform Expansion Packorg.keycloak-keycloak-parentNot affected
Red Hat OpenShift distributed tracing 3rhosdt/tempo-gateway-opa-rhel8Out of support scope
Red Hat OpenShift distributed tracing 3rhosdt/tempo-gateway-rhel8Out of support scope
Red Hat OpenShift distributed tracing 3rhosdt/tempo-jaeger-query-rhel8Out of support scope
Red Hat OpenShift distributed tracing 3rhosdt/tempo-query-rhel8Out of support scope
Red Hat OpenShift distributed tracing 3rhosdt/tempo-rhel8Out of support scope
Red Hat OpenShift distributed tracing 3rhosdt/tempo-rhel8-operatorOut of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-31125.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

  • sunhuiHi666/CVE-2025-31125 Harbor Check: matches CVE 6 stars, created
    Vite 任意文件读取漏洞POC
  • L15B04/Exploit-VITE-CVE-2025-30208-CVE-2025-31125 Harbor Check: matches CVE 2 stars, Python, created
    Python-based security assessment tool for detecting exposed Vite development servers, identifying sensitive file exposure, and validating f…
  • alinaclark672377250/Vitejs-exploit Harbor Check: matches CVE 0 stars, created
    Vite Development Server's @fs endpoint (CVE-2025-31125) to access sensitive files like /etc/passwd and /etc/hosts via crafted URLs.
  • harshgupptaa/Path-Transversal-CVE-2025-31125- Harbor Check: matches CVE 0 stars, created
    Vite is a frontend tooling framework for javascript. Vite exposes content of non-allowed files using ?inline&import or ?raw?import. Only ap…
  • 0xgh057r3c0n/CVE-2025-31125 Harbor Check: matches CVE 0 stars, created
    Vite WASM Import Path Traversal 🛡️
1 more
  • MuhammadWaseem29/Vitejs-exploit Harbor Check: matches CVE 0 stars, created
    Vite Development Server's @fs endpoint (CVE-2025-31125) to access sensitive files like /etc/passwd and /etc/hosts via crafted URLs.

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-284 (17), CWE-200 (59).

References

Check your stackJSON