Cloudflare Vite plugin exposes secrets over the built-in dev server
Published Sep 19, 2025 · Updated Nov 3, 2026
Original summary
Normalized public record · Updated Nov 3, 2026
Cloudflare Vite plugin exposes secrets over the built-in dev server
Publisher and source text is retained separately from QFinch interpretation.
QFinch assessment
Note: originally posted on H1 but closed. Cross-posting over to here in abundance of caution instead of a public issue. When utilising the Cloudflare Vite plugin in its default configuration, all files are exposed by the local dev server, including files in the root directory that contain secret information such as: - .env - .dev.vars
Potential impact
If the vite dev server is exposed on a public network, such as when a user simply uses wrangler to serve their application and doesn't publish to Cloudflare in production, an attacker may be able to acquire secrets that the user doesn't wish to be exposed. Another common scenario where this could happen is when sharing previews of an application using cloudflared. npm run dev -> share preview with cloudflared -> now all secrets are exposed to the public internet. Exposing via vite is possible via: The default configuration has no reason to expose information outside of the configured assets directory. Example: curl http://somehost/.env may expose secrets curl http://somehost/.dev.vars may expose secrets curl http://somehost/package.json may expose dependencies used by the project, potentially leading to other vulnerabilities curl http://somehost/README.md may expose internal documentation etc. Information disclosure to anyone on the same network, or if the dev server is exposed such as via cloudflared as explored here: https://github.com/cloudflare/workers-sdk/discussions/3455discussioncomment-6165773
Evidence: public source recordsAffected products
| Affected package, product or range | Fix status |
|---|---|
| Consult the referenced vendor advisory for affected versions. | Consult source advisory |
Matching a version is only one part of assessing exposure. QFinch has not assessed your environment on this public page.
Remediation
Apply the vendor-supported fixed release or mitigation, then verify the affected component is no longer reachable.
- Confirm the affected product and reachable code path exist in your environment.
- Apply the vendor-supported patch or mitigation from the primary advisory.
- Rescan the exact deployed revision and retain verification evidence.
Evidence coverage
- SSVC priority
- LOW
- Confidence
- Not available
- Aliases
- None reported
Scores appear only when corresponding evidence exists. Missing data is never interpreted as zero risk.
Sources and record history
Record history
Published Sep 19, 2025 · Last refreshed Nov 3, 2026