Skip to main content
HighInfo disclosureOWASP A05:2021CWE-489

How to fix: Vite development client endpoint accessible

The Vite development server HMR (Hot Module Replacement) client is accessible, indicating a development server is running in a production or staging environment.

Why it matters

The Vite dev server is not designed for production use: it lacks security hardening, serves source maps and raw source files, and the HMR WebSocket endpoint accepts arbitrary module hot-replacement payloads. This can enable source code disclosure and code injection.

Vite's development server serves un-bundled source files and exposes HMR endpoints. It should never be deployed to environments accessible from the internet.

How to fix it

  1. 1Build the production bundle: npm run build
  2. 2Serve the dist/ directory with a proper web server (nginx, Vercel, Netlify)
  3. 3Never use vite dev or vite preview in production
  4. 4Ensure CI/CD deploys the build output, not the dev server

Code examples

Production build and serve

bash
# Build production bundle
npm run build

# Serve with a static server:
npx serve dist -l 3000
# Or Nginx pointing to dist/
# Never: vite dev in production

References

Detected automatically by VulnRadar. The check id is vite-client-exposed, stable across every scan so you can filter or diff on it.

See every info disclosure check

Questions

How severe is Vite development client endpoint accessible?
VulnRadar rates this high severity in the info disclosure category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id vite-client-exposed, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Vite development client endpoint accessible map to?
It maps to CWE-489. In the OWASP Top 10 it falls under A05:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for vite development client endpoint accessible

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

Vite development client endpoint accessible fix | VulnRadar