GHSA-v2wj-q39q-566r

Suggest an improvement
Source
https://github.com/advisories/GHSA-v2wj-q39q-566r
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-v2wj-q39q-566r/GHSA-v2wj-q39q-566r.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-v2wj-q39q-566r
Aliases
Downstream
CGA (60)
CLSA (1)
MINI (4)
Published
2026-04-06T18:03:32Z
Modified
2026-07-17T21:04:44Z
Severity
  • 8.2 (High) CVSS_V4 - 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 CVSS Calculator
Summary
Vite: `server.fs.deny` bypassed with queries
Details

Summary

The contents of files that are specified by server.fs.deny can be returned to the browser.

Impact

Only apps that match the following conditions are affected:

Details

On the Vite dev server, files that should be blocked by server.fs.deny (e.g., .env, *.crt) can be retrieved with HTTP 200 responses when query parameters such as ?raw, ?import&raw, or ?import&url&inline are appended.

PoC

  1. Start the dev server: pnpm exec vite root --host 127.0.0.1 --port 5175 --strictPort
  2. Confirm that server.fs.deny is enforced (expect 403): curl -i http://127.0.0.1:5175/src/.env | head -n 20 image
  3. Confirm that the same files can be retrieved with query parameters (expect 200): image
Database specific
{
    "cwe_ids":  [
        "CWE-180",
        "CWE-284"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-04-06T18:03:32Z",
    "nvd_published_at":  "2026-04-07T20:16:30Z",
    "severity":  "HIGH"
}
References

Affected packages

npm / vite

Package

Affected ranges

Type
SEMVER
Events
Introduced
8.0.0
Fixed
8.0.5

Database specific

last_known_affected_version_range
"<= 8.0.4"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-v2wj-q39q-566r/GHSA-v2wj-q39q-566r.json"

npm / vite

Package

Affected ranges

Type
SEMVER
Events
Introduced
7.1.0
Fixed
7.3.2

Database specific

last_known_affected_version_range
"<= 7.3.1"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-v2wj-q39q-566r/GHSA-v2wj-q39q-566r.json"