Vite middleware may serve files starting with the same name with the public directory
Published Sep 8, 2025
2.3
LOWCVSS 4.0
EPSS 1.21%
Description
Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, files starting with the same name with the public directory were served bypassing the `server.fs` settings. Only apps that explicitly expose the Vite dev server to the network (using --host or `server.host` config option), use the public directory feature (enabled by default), and have a symlink in the public directory are affected. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue.
Affected products
-
- Version < 5.4.20StatusaffectedConstraints-
- Version >= 6.0.0, < 6.3.6StatusaffectedConstraints-
- Version >= 7.0.0, < 7.0.7StatusaffectedConstraints-
- Version >= 7.1.0, < 7.1.5StatusaffectedConstraints-
- Version
No data.
Cryostat 4
io.cryostat-cryostat
Fix deferred
Gatekeeper 3
gatekeeper/gatekeeper-rhel9
Fix deferred
Migration Toolkit for Virtualization
migration-toolkit-virtualization/mtv-console-plugin-rhel9
Fix deferred
Migration Toolkit for Virtualization
mtv-candidate/mtv-console-plugin-rhel9
Fix deferred
Multicluster Engine for Kubernetes
multicluster-engine/console-mce-rhel9
Fix deferred
Multicluster Global Hub
multicluster-globalhub/multicluster-globalhub-grafana-rhel9
Fix deferred
OpenShift Service Mesh 3
openshift-service-mesh-tech-preview/istio-ztunnel-rhel9
Fix deferred
OpenShift Service Mesh 3
openshift-service-mesh/istio-cni-rhel9
Fix deferred
OpenShift Service Mesh 3
openshift-service-mesh/istio-must-gather-rhel9
Fix deferred
OpenShift Service Mesh 3
openshift-service-mesh/istio-pilot-rhel9
Fix deferred
OpenShift Service Mesh 3
openshift-service-mesh/istio-proxyv2-rhel9
Fix deferred
OpenShift Service Mesh 3
openshift-service-mesh/istio-rhel9-operator
Fix deferred
OpenShift Service Mesh 3
openshift-service-mesh/istio-sail-operator-bundle
Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2
rhacm2/acm-grafana-rhel9
Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2
rhacm2/console-rhel9
Fix deferred
Red Hat Ansible Automation Platform 2
automation-controller
Fix deferred
Red Hat Ansible Automation Platform 2
automation-eda-controller
Fix deferred
Red Hat Ansible Automation Platform 2
automation-gateway
Fix deferred
Red Hat Data Grid 8
org.infinispan-infinispan-console
Fix deferred
Red Hat Discovery 1
discovery/discovery-ui-rhel9
Fix deferred
Red Hat Discovery 2
discovery/discovery-ui-rhel9
Fix deferred
Red Hat JBoss Enterprise Application Platform 8
org.keycloak-keycloak-parent
Fix deferred
Red Hat JBoss Enterprise Application Platform Expansion Pack
org.keycloak-keycloak-parent
Fix deferred
Red Hat OpenShift AI (RHOAI)
rhoai/odh-dashboard-rhel8
Fix deferred
Red Hat OpenShift AI (RHOAI)
rhoai/odh-dashboard-rhel9
Fix deferred
Red Hat OpenShift Container Platform 4
openshift4/ose-console-rhel9
Fix deferred
Red Hat OpenShift Dev Spaces
devspaces/dashboard-rhel9
Fix deferred
Red Hat OpenShift Dev Spaces
devspaces/traefik-rhel9
Fix deferred
Red Hat OpenShift GitOps
openshift-gitops-1/argo-rollouts-rhel8
Fix deferred
Red Hat OpenShift GitOps
openshift-gitops-1/argocd-agent-rhel8
Fix deferred
Red Hat OpenShift GitOps
openshift-gitops-1/argocd-extensions-rhel8
Fix deferred
Red Hat OpenShift GitOps
openshift-gitops-1/argocd-rhel8
Fix deferred
Red Hat OpenShift GitOps
openshift-gitops-1/argocd-rhel9
Fix deferred
Red Hat OpenShift GitOps
openshift-gitops-1/console-plugin-rhel8
Fix deferred
Red Hat OpenShift GitOps
openshift-gitops-1/dex-rhel8
Fix deferred
Red Hat OpenShift GitOps
openshift-gitops-1/gitops-operator-bundle
Fix deferred
Red Hat OpenShift GitOps
openshift-gitops-1/gitops-rhel8
Fix deferred
Red Hat OpenShift GitOps
openshift-gitops-1/gitops-rhel8-operator
Fix deferred
Red Hat OpenShift GitOps
openshift-gitops-1/must-gather-rhel8
Fix deferred
Red Hat OpenShift distributed tracing 3
rhosdt/jaeger-agent-rhel8
Fix deferred
Red Hat OpenShift distributed tracing 3
rhosdt/jaeger-all-in-one-rhel8
Fix deferred
Red Hat OpenShift distributed tracing 3
rhosdt/jaeger-collector-rhel8
Fix deferred
Red Hat OpenShift distributed tracing 3
rhosdt/jaeger-es-index-cleaner-rhel8
Fix deferred
Red Hat OpenShift distributed tracing 3
rhosdt/jaeger-es-rollover-rhel8
Fix deferred
Red Hat OpenShift distributed tracing 3
rhosdt/jaeger-ingester-rhel8
Fix deferred
Red Hat OpenShift distributed tracing 3
rhosdt/jaeger-operator-bundle
Fix deferred
Red Hat OpenShift distributed tracing 3
rhosdt/jaeger-query-rhel8
Fix deferred
Red Hat OpenShift distributed tracing 3
rhosdt/jaeger-rhel8-operator
Fix deferred
Red Hat OpenShift distributed tracing 3
rhosdt/tempo-jaeger-query-rhel8
Fix deferred
Red Hat Openshift Data Foundation 4
odf4/ocs-client-console-rhel9
Fix deferred
Red Hat Openshift Data Foundation 4
odf4/odf-console-rhel9
Fix deferred
Red Hat Openshift Data Foundation 4
odf4/odf-multicluster-console-rhel9
Fix deferred
Red Hat build of Apicurio Registry 2
io.apicurio-apicurio-registry
Fix deferred
| Product | Package | State | Advisory |
|---|---|---|---|
| Cryostat 4 | io.cryostat-cryostat | Fix deferred | n/a |
| Gatekeeper 3 | gatekeeper/gatekeeper-rhel9 | Fix deferred | n/a |
| Migration Toolkit for Virtualization | migration-toolkit-virtualization/mtv-console-plugin-rhel9 | Fix deferred | n/a |
| Migration Toolkit for Virtualization | mtv-candidate/mtv-console-plugin-rhel9 | Fix deferred | n/a |
| Multicluster Engine for Kubernetes | multicluster-engine/console-mce-rhel9 | Fix deferred | n/a |
| Multicluster Global Hub | multicluster-globalhub/multicluster-globalhub-grafana-rhel9 | Fix deferred | n/a |
| OpenShift Service Mesh 3 | openshift-service-mesh-tech-preview/istio-ztunnel-rhel9 | Fix deferred | n/a |
| OpenShift Service Mesh 3 | openshift-service-mesh/istio-cni-rhel9 | Fix deferred | n/a |
| OpenShift Service Mesh 3 | openshift-service-mesh/istio-must-gather-rhel9 | Fix deferred | n/a |
| OpenShift Service Mesh 3 | openshift-service-mesh/istio-pilot-rhel9 | Fix deferred | n/a |
| OpenShift Service Mesh 3 | openshift-service-mesh/istio-proxyv2-rhel9 | Fix deferred | n/a |
| OpenShift Service Mesh 3 | openshift-service-mesh/istio-rhel9-operator | Fix deferred | n/a |
| OpenShift Service Mesh 3 | openshift-service-mesh/istio-sail-operator-bundle | Fix deferred | n/a |
| Red Hat Advanced Cluster Management for Kubernetes 2 | rhacm2/acm-grafana-rhel9 | Fix deferred | n/a |
| Red Hat Advanced Cluster Management for Kubernetes 2 | rhacm2/console-rhel9 | Fix deferred | n/a |
| Red Hat Ansible Automation Platform 2 | automation-controller | Fix deferred | n/a |
| Red Hat Ansible Automation Platform 2 | automation-eda-controller | Fix deferred | n/a |
| Red Hat Ansible Automation Platform 2 | automation-gateway | Fix deferred | n/a |
| Red Hat Data Grid 8 | org.infinispan-infinispan-console | Fix deferred | n/a |
| Red Hat Discovery 1 | discovery/discovery-ui-rhel9 | Fix deferred | n/a |
| Red Hat Discovery 2 | discovery/discovery-ui-rhel9 | Fix deferred | n/a |
| Red Hat JBoss Enterprise Application Platform 8 | org.keycloak-keycloak-parent | Fix deferred | n/a |
| Red Hat JBoss Enterprise Application Platform Expansion Pack | org.keycloak-keycloak-parent | Fix deferred | n/a |
| Red Hat OpenShift AI (RHOAI) | rhoai/odh-dashboard-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift AI (RHOAI) | rhoai/odh-dashboard-rhel9 | Fix deferred | n/a |
| Red Hat OpenShift Container Platform 4 | openshift4/ose-console-rhel9 | Fix deferred | n/a |
| Red Hat OpenShift Dev Spaces | devspaces/dashboard-rhel9 | Fix deferred | n/a |
| Red Hat OpenShift Dev Spaces | devspaces/traefik-rhel9 | Fix deferred | n/a |
| Red Hat OpenShift GitOps | openshift-gitops-1/argo-rollouts-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift GitOps | openshift-gitops-1/argocd-agent-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift GitOps | openshift-gitops-1/argocd-extensions-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift GitOps | openshift-gitops-1/argocd-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift GitOps | openshift-gitops-1/argocd-rhel9 | Fix deferred | n/a |
| Red Hat OpenShift GitOps | openshift-gitops-1/console-plugin-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift GitOps | openshift-gitops-1/dex-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift GitOps | openshift-gitops-1/gitops-operator-bundle | Fix deferred | n/a |
| Red Hat OpenShift GitOps | openshift-gitops-1/gitops-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift GitOps | openshift-gitops-1/gitops-rhel8-operator | Fix deferred | n/a |
| Red Hat OpenShift GitOps | openshift-gitops-1/must-gather-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift distributed tracing 3 | rhosdt/jaeger-agent-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift distributed tracing 3 | rhosdt/jaeger-all-in-one-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift distributed tracing 3 | rhosdt/jaeger-collector-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift distributed tracing 3 | rhosdt/jaeger-es-index-cleaner-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift distributed tracing 3 | rhosdt/jaeger-es-rollover-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift distributed tracing 3 | rhosdt/jaeger-ingester-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift distributed tracing 3 | rhosdt/jaeger-operator-bundle | Fix deferred | n/a |
| Red Hat OpenShift distributed tracing 3 | rhosdt/jaeger-query-rhel8 | Fix deferred | n/a |
| Red Hat OpenShift distributed tracing 3 | rhosdt/jaeger-rhel8-operator | Fix deferred | n/a |
| Red Hat OpenShift distributed tracing 3 | rhosdt/tempo-jaeger-query-rhel8 | Fix deferred | n/a |
| Red Hat Openshift Data Foundation 4 | odf4/ocs-client-console-rhel9 | Fix deferred | n/a |
| Red Hat Openshift Data Foundation 4 | odf4/odf-console-rhel9 | Fix deferred | n/a |
| Red Hat Openshift Data Foundation 4 | odf4/odf-multicluster-console-rhel9 | Fix deferred | n/a |
| Red Hat build of Apicurio Registry 2 | io.apicurio-apicurio-registry | Fix deferred | n/a |
vite
npm
Introduced 7.1.0 Fixed 7.1.5vite
npm
Introduced 7.0.0 Fixed 7.0.7vite
npm
Introduced 6.0.0 Fixed 6.3.6vite
npm
Introduced 0 Fixed 5.4.20
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | vite | 7.1.0 | 7.1.5 |
| npm | vite | 7.0.0 | 7.0.7 |
| npm | vite | 6.0.0 | 6.3.6 |
| npm | vite | 0 | 5.4.20 |
Remediation
Red Hat statement
Red Hat Customers should be aware that the underlying vulnerability originates in the sirv package, which is responsible for serving static files. Vite uses sirv internally to serve content during development, which means projects using Vite were also exposed to the issue. While sirv is technically the component containing the flaw, the upstream Vite project issued the CVE/advisory because the impact was most visible and widespread through Vite’s ecosystem. In practice, this means that both direct consumers of sirv and Vite users are affected, but the CVE was filed under Vite Project by it's maintainers. This vulnerability is rated Low severity because exploitation requires several specific conditions: the Vite dev server must be exposed to the network (via --host or server.host), the application must use the public directory feature, and a symlink must exist inside that public directory to point to the target. These conditions make exploitation unlikely in typical production environments, and the impact is limited to disclosure of files outside the intended directory. The vulnerability does not permit code execution, file modification, or denial of service.
Red Hat mitigation
* Avoid exposing the Vite dev server (--host / server.host) to untrusted networks. * Do not allow symlinks inside the public directory that reference files outside of it.
References (12)
- https://access.redhat.com/security/cve/CVE-2025-58751 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2393970 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-27181 Advisory
- https://github.com/advisories/GHSA-g4jq-h2w9-997c Advisory
- https://github.com/lukeed/sirv/commit/f0113f3f8266328d804ee808f763a3c11f8997eb x_refsource_MISCPatch
- https://github.com/vitejs/vite/commit/09f2b52e8d5907f26602653caf41b3a56692600d x_refsource_MISCPatch
- https://github.com/vitejs/vite/commit/4f1c35bcbb5830290c694aa14b6789e07450f069 x_refsource_MISCPatch
- https://github.com/vitejs/vite/commit/63e2a5d232218f3f8d852056751e609a5367aaec x_refsource_MISCPatch
- https://github.com/vitejs/vite/commit/e11d24008b97d4ca731ecc1a3b95260a6d12e7e0 x_refsource_MISCPatch
- https://github.com/vitejs/vite/security/advisories/GHSA-g4jq-h2w9-997c exploitx_refsource_CONFIRMThird Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2025-58751
- https://www.cve.org/CVERecord?id=CVE-2025-58751
| Link | Providers | Tags |
|---|---|---|
| https://access.redhat.com/security/cve/CVE-2025-58751 | Vendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2393970 | Issue Tracking | |
| https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-27181 | Advisory | |
| https://github.com/advisories/GHSA-g4jq-h2w9-997c | Advisory | |
| https://github.com/lukeed/sirv/commit/f0113f3f8266328d804ee808f763a3c11f8997eb | x_refsource_MISCPatch | |
| https://github.com/vitejs/vite/commit/09f2b52e8d5907f26602653caf41b3a56692600d | x_refsource_MISCPatch | |
| https://github.com/vitejs/vite/commit/4f1c35bcbb5830290c694aa14b6789e07450f069 | x_refsource_MISCPatch | |
| https://github.com/vitejs/vite/commit/63e2a5d232218f3f8d852056751e609a5367aaec | x_refsource_MISCPatch | |
| https://github.com/vitejs/vite/commit/e11d24008b97d4ca731ecc1a3b95260a6d12e7e0 | x_refsource_MISCPatch | |
| https://github.com/vitejs/vite/security/advisories/GHSA-g4jq-h2w9-997c | exploitx_refsource_CONFIRMThird Party Advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-58751 | ||
| https://www.cve.org/CVERecord?id=CVE-2025-58751 |
Change history (0)
No recorded changes yet.