Loading HuntDB...

CVE-2025-59427

UNKNOWN
Published 2025-09-19T15:30:10.139Z
Actions:

Expert Analysis

Professional remediation guidance

Get tailored security recommendations from our analyst team for CVE-2025-59427. We'll provide specific mitigation strategies based on your environment and risk profile.

No CVSS data available

Description

The Cloudflare Vite plugin enables a full-featured integration between Vite and the Workers runtime. 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 and .dev.vars. This vulnerability is fixed in 1.6.0.

Available Exploits

No exploits available for this CVE.

Related News

No news articles found for this CVE.

Affected Products

EU Vulnerability Database

Monitored by ENISA for EU cybersecurity

EU Coordination

Not EU Coordinated

Exploitation Status

No Known Exploitation

ENISA Analysis

Malicious code in bioql (PyPI)

Affected Products (ENISA)

cloudflare
workers-sdk

ENISA Scoring

CVSS Score (4.0)

2.9
/10
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P

EPSS Score

0.060
probability

Data provided by ENISA EU Vulnerability Database. Last updated: October 3, 2025

GitHub Security Advisories

Community-driven vulnerability intelligence from GitHub

✓ GitHub Reviewed MODERATE

Cloudflare Vite plugin exposes secrets over the built-in dev server

GHSA-4pfg-2mw5-f8jx

Advisory Details

### Summary Note: [originally posted on H1](https://hackerone.com/reports/3117837) 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` ### PoC 1. Create a Workers project that utilises the `@cloudflare/vite-plugin`. For example: - `npm create cloudflare@latest` - select Framework Starter -> React 2. Add any secret files to test if they're accessible. `echo foobar=secret > .dev.vars` for example 3. Run `npm run dev` to start the dev server (after running `npm ci` if necessary to install dependencies) and then hit the following to expose information: `curl http://localhost:5173/.env` may expose any secrets in this file `curl http://localhost:5173/.dev.vars` may expose any secrets in this file `curl http://localhost:5173/package.json` may expose dependencies used by the project, potentially leading to other vulnerabilities `curl http://localhost:5173/README.md` may expose internal documentation ### 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: ``` npm run dev -- -- --host 0.0.0.0 ``` 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/3455#discussioncomment-6165773

Affected Packages

npm @cloudflare/vite-plugin
ECOSYSTEM: ≥0 <1.6.0

CVSS Scoring

CVSS Score

5.0

CVSS Vector

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P

Advisory provided by GitHub Security Advisory Database. Published: July 8, 2025, Modified: September 22, 2025

References

Published: 2025-09-19T15:30:10.139Z
Last Modified: 2025-09-19T15:30:10.139Z
Copied to clipboard!