THREATOPS
THREAT OPS › Threat News › [GHSA] GHSA-qxg6-89mg-rqv8 (medium) — Vitest: Code injection via unauthenticated manual mock registration

[GHSA] GHSA-qxg6-89mg-rqv8 (medium) — Vitest: Code injection via unauthenticated manual mock registration

highgithub_advisoriesPublished 2026-10-21

GHSA-qxg6-89mg-rqv8 Severity: medium CVE: CVE-2026-112949

Vitest: Code injection via unauthenticated manual mock registration

### Summary

`@vitest/mocker`'s `interceptorPlugin` accepts mock registrations on Vite's dev-server WebSocket with no authentication, and interpolates the mock's `url` into generated module source without escaping. A client that can reach the dev server can make it serve

MITRE ATT&CK techniques

Indicators of compromise

Original source: https://github.com/advisories/GHSA-qxg6-89mg-rqv8