{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "4.0.17"
              },
              {
                "fixed": "4.1.6"
              },
              {
                "introduced": "5.0.0-beta.0"
              },
              {
                "fixed": "5.0.0-beta.3"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "dd54e944ec0d7b2730933341f3b940e92b186fb6"
            },
            {
              "introduced": "0"
            },
            {
              "fixed": "a8fd24c1cad2320b19fcc651413c7d928423bdc1"
            },
            {
              "fixed": "0f274d0d645e874952d13ec27c4a9f6ff6aa57a1"
            },
            {
              "fixed": "18af98cee1830604d57f6a02bf28f8067cdffc06"
            },
            {
              "fixed": "3514f9fa135c90e1c35754fc4d27c9cf351faafa"
            }
          ],
          "repo": "https://github.com/vitest-dev/vitest",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-2h32-95rg-cppp"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47428.json"
  },
  "details": "Vitest is a testing framework powered by Vite. From 4.0.17 until 4.1.6 and 5.0.0-beta.3, Vitest Browser Mode served /__vitest_test__/ with the otelCarrier query parameter inserted directly into an inline module script, allowing a crafted browser-runner URL to execute arbitrary JavaScript in the Vitest server origin and recover VITEST_API_TOKEN for authenticated API calls. This issue is fixed in versions 4.1.6 and 5.0.0-beta.3.",
  "id": "CVE-2026-47428",
  "modified": "2026-07-17T03:41:57.868725010Z",
  "published": "2026-07-14T19:30:19.670Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/vitest-dev/vitest/releases/tag/v4.1.6"
    },
    {
      "type": "WEB",
      "url": "https://github.com/vitest-dev/vitest/releases/tag/v5.0.0-beta.3"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47428.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/vitest-dev/vitest/security/advisories/GHSA-2h32-95rg-cppp"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-47428"
    },
    {
      "type": "FIX",
      "url": "https://github.com/vitest-dev/vitest/commit/18af98cee1830604d57f6a02bf28f8067cdffc06"
    },
    {
      "type": "FIX",
      "url": "https://github.com/vitest-dev/vitest/commit/3514f9fa135c90e1c35754fc4d27c9cf351faafa"
    },
    {
      "type": "FIX",
      "url": "https://github.com/vitest-dev/vitest/pull/10283"
    },
    {
      "type": "FIX",
      "url": "https://github.com/vitest-dev/vitest/pull/10285"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Vitest browser mode serves unsanitized otelCarrier query parameter as inline script"
}