CVE Intelligence
Medium Injection

CVE-2026-112949 — Vitest: Code injection via unauthenticated manual mock registration

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.

Published Oct 20, 2026 · Updated Oct 20, 2026 · Sources: NIST National Vulnerability Database, CVE Program (cve.org) e CISA ADP · CNA: GitHub_M

Who exploits it and how urgent it is

A 0–100 score combining confirmed exploitation, ransomware and APT use, public exploits, EPSS and severity.

No exploitation signal in the sources consulted so far.
How the score was calculated
  • Technical severity (medium)+3

The score orders the patch queue; it does not replace your asset context (internet exposure, criticality, compensating controls).

Triage

Is it exploited, how likely is exploitation, what does it touch, and how severe do the sources call it.

Exploitation
Not confirmed
Not in CISA KEV — an absence of record, not proof it is unexploited.
EPSS FIRST
—
No EPSS score.
Affects
@vitest
Mocker and 1 more
CVSS base
4.7
Medium · 2 source(s)

Remediation

Fixes and mitigations documented by the sources — linked to the original advisory.

No fix documented by the sources we poll. That does not mean none exists: check the vendor advisory.

First 24 hours

Ordered from the record’s own fields — exposure first, because you cannot patch what you have not found. A rule-generated starting point.

  1. Identify exposed assets running the affected vendor/product/version combinations (@vitest Mocker, Vitest.dev Vitest).
  2. The attack is network-based and needs no privileges: restrict exposure (ACLs, VPN, WAF) until patched.
  3. No fix documented in the sources: reduce exposure and monitor the vendor advisory.
  4. Exploitation requires user interaction: tighten email/web filtering and warn affected users.
  5. Search available logs for exploit probes matching the vulnerability class (injection), errors and authentication anomalies.

Affected scope

Vendor, product and versions as the sources word them.

VendorProductVersionsStatusSource
@vitest Mocker version >= 2.1.0-beta.7, < 4.1.12version >= 5.0.0, < 5.0.3 Vulnerable CVE Program (cve.org) e CISA ADP
Vitest.dev Vitest version >= 2.1.0-beta.7, < 4.1.12version >= 5.0.0, < 5.0.3 Vulnerable CVE Program (cve.org) e CISA ADP

Attack characteristics

The CVSS vector, decoded. It describes the attack, not your exposure to it.

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Every base score collected

Sources score independently and may disagree; each row says who scored it and under which version.

ScoreVersionSeverityExpl.ImpactScored by
4.7 CVSS 3.1 Medium 1.6 2.7 security-advisories@github.com via NIST National Vulnerability Database
4.7 CVSS 3.1 Medium — — GitHub_M via CVE Program (cve.org) e CISA ADP
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N (score shown at the top: security-advisories@github.com)

Weakness MITRE

Weakness class according to MITRE’s CWE catalog.

CWE-94 · Code Injection

Other CVEs with this weakness →

Detection

Read off the CVSS vector and the weakness class. Starting points, not tested rules.

  • Prioritize edge telemetry for the network-reachable component (proxy, WAF, IDS/IPS).
  • Look for parameters with command/query metacharacters and unexpected child processes of the service.
web/proxy/WAF logsnetwork IDS/IPSapplication logsendpoint telemetry (EDR)

Timeline

What happened to this CVE, newest first.

  • 2026
  • Source status changed · Received → Awaiting Analysis
    Oct 20, 2026 · NIST National Vulnerability Database
  • Affected products added · vitest-dev/vitest, @vitest/mocker
    Oct 20, 2026 · CVE Program (cve.org) e CISA ADP
  • Record published
    Oct 20, 2026
  • CVSS changed · 4.7
    Oct 20, 2026 · NIST National Vulnerability Database
  • Source status changed · → Received
    Oct 20, 2026 · NIST National Vulnerability Database
  • Record created in this database
    Oct 20, 2026 · Alertas do Telegram
  • CVE published
    Oct 20, 2026 · GitHub_M

Source activity

Repeated readings are counted rather than listed.

  • 1× References added · Oct 20, 2026 – Oct 20, 2026
  • 1× Official description updated · Oct 20, 2026 – Oct 20, 2026

References

5 on the record

Elsewhere on this site

@vitest
every CVE for this vendor
Injection
same class
CWE-94
other pages naming this weakness

Related CVEs (same products)

  • Medium CVE-2026-112948 Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file 1d
  • Medium CVE-2026-112950 Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix 1d
  • Medium CVE-2026-84373 Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock Sep 1, 2026
  • Critical CVE-2026-73653 Vitest: Browser Mode provider commands bypass the file-access permission gate Aug 13, 2026
  • Critical CVE-2026-53633 Vitest: Exposed Browser Mode API Can Proxy CDP and Overwrite Config Files, Leading to RCE Jul 14, 2026
  • Medium CVE-2026-47429 Vitest: Arbitrary file can be read and executed when Vitest UI server is listening Jul 14, 2026

Not in any source we poll

Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.

  • No FIRST EPSS score.
  • No fixed version, patch or mitigation documented.
  • No CISA SSVC assessment.
  • No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
  • No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
  • No exploit packet captures, log samples, or incident case IDs supplied.

Answered from this record

Text assembled only from the fields above — no additional claims.

What should defenders know first?

CVE-2026-112949 is "Vitest: Code injection via unauthenticated manual mock registration", rated Medium. It affects Mocker (@vitest); versions are in the scope table. It is not in CISA KEV, which does not rule out exploitation. CVSS 4.7 describes technical severity. First verify whether exposed or business-critical assets run the affected versions, apply vendor fixes or mitigations, and preserve logs for review.

Comments

Moderated technical discussion. Read the community guidelines.

No comments yet.

Sign in or create an account to comment and suggest corrections.