CVE-2026-112949 json
Vitest: Code injection via unauthenticated manual mock registration
published 2026-10-20 20 d ago modified 2026-10-23 17 d ago also EUVD-2026-105148 , GHSA-qxg6-89mg-rqv8
- cvss
- 4.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 27%
- public exploits
- 0
- none known
Summary
Vitest is a Vite-native testing framework for JavaScript and TypeScript projects. From 2.1.0-beta.7 until 4.1.12 and 5.0.3, an unauthenticated non-browser WebSocket client that can reach a development server using interceptorPlugin can register a manual mock whose attacker-controlled url createManualModuleSource inserts unescaped into generated module source. When the developer browser loads the affected module, attacker-controlled JavaScript executes on the development-server origin. This issue is fixed in versions 4.1.12 and 5.0.3.
Patch / fix
- npm @vitest/mocker 4.1.12, 5.0.3
- vitest.dev vitest 4.1.12, 5.0.3
- vitest.dev vitest/mocker 4.1.12, 5.0.3
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-112949 updated cvss 4.7
vitest: Vitest: Cross-site scripting via unescaped mock module URL
-
Red Hat AMQ Broker 7 amq-broker-bin.zip 7.14.1.CR3, amq-broker-maven-repository.zip 7.14.1.CR3affected: no fix available “Fix deferred”
-
Red Hat Ansible Automation Platform 2 automation-platform-ui 2.6.15-1.el9ap, automation-gateway 2.5.20260923-1.el9ap, ansible-automation-platform-26/gateway-rhel9, ansible-automation-platform-27/gateway-rhel9affected: no fix available, no fix planned “Out of support scope”
-
Red Hat Build of Keycloak rhbk-quarkus-dist.zip 26.6.7.CR1, keycloak-operator.redhat-00001.zip 26.6.6, keycloak-operator.redhat-00003.zip 26.6.7 Red Hat Build of Podman Desktop rh-podman-desktop 3c6fc75a2a6cf5bb9b8a667fddcbbf428132badc Red Hat JBoss Enterprise Application Platform 8 jboss-eap-runtime-maven-repository.zip 8.1.2, jboss-eap.1-runtime-maven-repository.zip 8.1.0 Red Hat JBoss Enterprise Application Platform Expansion Pack jboss-eap-runtime-maven-repository.zip 8.1.2, jboss-eap.1-runtime-maven-repository.zip 8.1.0 Red Hat Trusted Artifact Signer rhtas/rhtas-console-ui-rhel9affected: no fix available “Fix deferred”
-
Red Hat Hardened Images grafana13.2 13.2.3-0.3.hum1, prometheus3.13 3.13.4-0.1.hum1not affected: component not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 17 d ago
Exploit prediction
0.34% chance of exploitation in the next 30 days, higher than 27% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/vitest-dev/vitest/security/advisories/GHSA-qxg6-89mg-rqv8 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | @vitest/mocker | >=2.1.0-beta.7, <4.1.12 >=5.0.0-beta.1, <5.0.3 |
4.1.12 5.0.3 |
Affected products
- vitest-dev vitest
- @vitest mocker
Classification
References
-
github.com
/vitest-dev/vitest/commit/15cc006aa9f8683dc5f7e895d011fa7dc751ce35
web
-
github.com
/vitest-dev/vitest/commit/b825313243dc55757e8d7c0f9e7a792135e13473
web
-
github.com
/vitest-dev/vitest/security/advisories/GHSA-qxg6-89mg-rqv8
exploit, web
-
github.com
/vitest-dev/vitest/releases/tag/v4.1.12
web
-
github.com
/vitest-dev/vitest/releases/tag/v5.0.3
web
-
nvd.nist.gov
/vuln/detail/CVE-2026-112949
advisory
-
github.com
/vitest-dev/vitest
package
Sources
- CVE List CVE-2026-112949
- GitHub Advisory GHSA-qxg6-89mg-rqv8
- NVD CVE-2026-112949
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.