{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "2.1.0-beta.7"
                  },
                  {
                    "fixed": "4.1.12"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "introduced": "5.0.0"
                  },
                  {
                    "fixed": "5.0.3"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "fixed": "15cc006aa9f8683dc5f7e895d011fa7dc751ce35"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "b825313243dc55757e8d7c0f9e7a792135e13473"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "v4.1.12",
                "range": [
                  {
                    "fixed": "4766ce1e72ded629d3a37637f57eeae643789a8c"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "original_tag": "v5.0.3",
                "range": [
                  {
                    "fixed": "33cadea62e8763c455c7fca38d9ab1dda87c5f75"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "b2be23e4c901c1667c94c8119dfe94b6063e6d30"
            },
            {
              "fixed": "4766ce1e72ded629d3a37637f57eeae643789a8c"
            },
            {
              "introduced": "f441c6fab25e579c5b7dd3dd50538416f415fbae"
            },
            {
              "fixed": "33cadea62e8763c455c7fca38d9ab1dda87c5f75"
            },
            {
              "fixed": "15cc006aa9f8683dc5f7e895d011fa7dc751ce35"
            },
            {
              "fixed": "b825313243dc55757e8d7c0f9e7a792135e13473"
            }
          ],
          "repo": "https://github.com/vitest-dev/vitest",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-qxg6-89mg-rqv8"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-116",
      "CWE-306",
      "CWE-94"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/112xxx/CVE-2026-112949.json"
  },
  "details": "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.",
  "id": "CVE-2026-112949",
  "modified": "2026-10-21T02:30:38.000604638Z",
  "published": "2026-10-20T15:19:03.799Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/112xxx/CVE-2026-112949.json"
    },
    {
      "type": "FIX",
      "url": "https://github.com/vitest-dev/vitest/commit/15cc006aa9f8683dc5f7e895d011fa7dc751ce35"
    },
    {
      "type": "FIX",
      "url": "https://github.com/vitest-dev/vitest/commit/b825313243dc55757e8d7c0f9e7a792135e13473"
    },
    {
      "type": "WEB",
      "url": "https://github.com/vitest-dev/vitest/releases/tag/v4.1.12"
    },
    {
      "type": "WEB",
      "url": "https://github.com/vitest-dev/vitest/releases/tag/v5.0.3"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/vitest-dev/vitest/security/advisories/GHSA-qxg6-89mg-rqv8"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-112949"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Vitest: Code injection via unauthenticated manual mock registration"
}