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
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
- JavaScriptT1059.007
Indicators of compromise
- 8ff9b9a9efca7c6cfd5243569440de8d7a33aec4sha1
- 9e1166959e14bd32298d8a0e85352431c769ec7asha1
- CVE-2026-112949cve
- https://evil.example`url
- https://evil.exampleurl
Original source: https://github.com/advisories/GHSA-qxg6-89mg-rqv8