cve.bz

CVE-2026-112949 Code Injection

4.7 mediumEPSS 0.3%Fix available

Medium (4.7). EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in @vitest/mocker 4.1.12, 5.0.3.

On this page
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.

Severity

CVSS 3.1

4.7 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
0.3% (unchanged from 0.3% a week ago) estimated probability of exploitation activity in the next 30 days; 27th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2026-10-23. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-94 Improper Control of Generation of Code (Code Injection)
CWE-116 Improper Encoding or Escaping of Output
CWE-306 Missing Authentication for Critical Functionality
OWASP Top 10
A05:2025 Injection, A07:2025 Authentication Failures
Published
Modified
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

  • @vitest/mocker (npm): fixed in 4.1.12, 5.0.3

Ask an AI about this CVE

Show the promptExplain CVE-2026-112949 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-112949?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-112949?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-112949 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
vitest-dev vitest>= 2.1.0-beta.7, < 4.1.12
vitest-dev vitest>= 5.0.0, < 5.0.3
@vitest mocker>= 2.1.0-beta.7, < 4.1.12
@vitest mocker>= 5.0.0, < 5.0.3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-qxg6-89mg-rqv8npm@vitest/mocker>=2.1.0-beta.7 <4.1.124.1.12
GHSA-qxg6-89mg-rqv8npm@vitest/mocker>=5.0.0-beta.1 <5.0.35.0.3

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability is rated as Moderate severity for Red Hat because it is restricted to active local development environments and cannot be triggered in production artifacts. Exploitation requires an attacker capable of communicating directly with the development WebSocket endpoint, followed by a developer opening the compromised module in a browser session. Red Hat production workloads and distribution builds do not execute the vulnerable development server mocking plugins, substantially limiting the potential blast radius.

ProductPackageStateAdvisory
Red Hat AMQ Broker 7amq-broker-bin.zipFix deferred
Red Hat AMQ Broker 7amq-broker-maven-repository.zipFix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/gateway-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/gateway-rhel9Fix deferred
Red Hat Ansible Automation Platform 2automation-gatewayOut of support scope
Red Hat Ansible Automation Platform 2automation-platform-uiFix deferred
Red Hat Build of Keycloakkeycloak-operator.redhat-00001.zipFix deferred
Red Hat Build of Keycloakkeycloak-operator.redhat-00003.zipFix deferred
Red Hat Build of Keycloakrhbk-quarkus-dist.zipFix deferred
Red Hat Build of Podman Desktoprh-podman-desktopFix deferred
Red Hat Hardened Imagesgrafana13.2Not affected
Red Hat Hardened Imagesprometheus3.13Not affected
Red Hat JBoss Enterprise Application Platform 8jboss-eap.1-runtime-maven-repository.zipFix deferred
Red Hat JBoss Enterprise Application Platform 8jboss-eap-runtime-maven-repository.zipFix deferred
Red Hat JBoss Enterprise Application Platform Expansion Packjboss-eap.1-runtime-maven-repository.zipFix deferred
Red Hat JBoss Enterprise Application Platform Expansion Packjboss-eap-runtime-maven-repository.zipFix deferred
Red Hat Trusted Artifact Signerrhtas/rhtas-console-ui-rhel9Fix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-112949.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High
  • CAPEC-73 User-Controlled Filename Likelihood: High · Severity: High
  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-104 Cross Zone Scripting Likelihood: Medium · Severity: High
  • CAPEC-12 Choosing Message Identifier Likelihood: High · Severity: High
  • CAPEC-36 Using Unpublished Interfaces or Functionality Likelihood: Medium · Severity: High
  • CAPEC-62 Cross Site Request Forgery Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-306.

References

Check your stackJSON