{"answers":{"affected":"6 open source packages ship an affected version, including vite. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-49293 exists.","fix":"Upgrade vite to a fixed version for your release line: 4.4.12, 4.5.1 or 5.0.5.","what":"CVE-2023-49293 is a medium-severity cross-site scripting vulnerability in vitejs vite, published on 4 Dec 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-49293 and fix it if it is affected.\n\nWhat it is: CVE-2023-49293 is a medium-severity cross-site scripting vulnerability in vitejs vite, published on 4 Dec 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-49293 exists.\n\nAffected packages and fixed versions:\n- vite (npm): affected from 4.4.0; fixed in 4.4.12\n- vite (npm): affected from 4.4.0; fixed in 4.4.12\n- vite (npm): affected from 4.5.0; fixed in 4.5.1\n- vite (npm): affected from 4.5.0; fixed in 4.5.1\n- vite (npm): affected from 5.0.0; fixed in 5.0.5\n- vite (npm): affected from 5.0.0; fixed in 5.0.5\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-49293/ (Markdown: https://insights.sbomify.com/CVE-2023-49293/index.md)","id":"CVE-2023-49293","markdown":"https://insights.sbomify.com/CVE-2023-49293/index.md","name":"CVE-2023-49293","record":{"aliases":["GHSA-92r3-m2mg-pj97","MINI-8wm3-55cx-v9c3"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Vite frontend framework","requires_auth":"none","summary":"Attackers can inject arbitrary HTML via malicious URLs in Vite dev servers using custom app types, potentially executing code in the browser.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"vite","vendor":"vitejs"}],"cvss":{"score":6.1,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"Vite is a website frontend framework. When Vite's HTML transformation is invoked manually via `server.transformIndexHtml`, the original request URL is passed in unmodified, and the `html` being transformed contains inline module scripts (`\u003cscript type=\"module\"\u003e...\u003c/script\u003e`), it is possible to inject arbitrary HTML into the transformed output by supplying a malicious URL query string to `server.transformIndexHtml`. Only apps using `appType: 'custom'` and using the default Vite HTML middleware are affected. The HTML entry must also contain an inline script. The attack requires a user to click on a malicious URL while running the dev server. Restricted files aren't exposed to the attacker. This issue has been addressed in vite@5.0.5, vite@4.5.1, and vite@4.4.12. There are no known workarounds for this vulnerability.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":1,"refs":[{"date":null,"kind":"nuclei","ref":"http/cves/2023/CVE-2023-49293.yaml","stars":null,"title":"Vite dev server - Cross-Site Scripting"}],"tier":"weaponised"},"has_fix":true,"headline":"Cross-site Scripting in `server.transformIndexHtml` via URL payload in vite","id":"CVE-2023-49293","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2023"},"n_packages":6,"n_references":1,"next":{"headline":"Asterisk Path Traversal vulnerability","id":"CVE-2023-49294"},"packages":[{"ecosystem":"npm","fixed":["4.4.12"],"introduced":["4.4.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-92r3-m2mg-pj97"},{"ecosystem":"npm","fixed":["4.4.12"],"introduced":["4.4.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-92r3-m2mg-pj97"},{"ecosystem":"npm","fixed":["4.5.1"],"introduced":["4.5.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-92r3-m2mg-pj97"},{"ecosystem":"npm","fixed":["4.5.1"],"introduced":["4.5.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-92r3-m2mg-pj97"},{"ecosystem":"npm","fixed":["5.0.5"],"introduced":["5.0.0"],"last_affected":[],"package":"vite","purl":null,"source":"GHSA-92r3-m2mg-pj97"},{"ecosystem":"npm","fixed":["5.0.5"],"introduced":["5.0.0"],"last_affected":[],"package":"vite","purl":"pkg:npm/vite","source":"GHSA-92r3-m2mg-pj97"}],"prev":{"headline":"Possible private key restoration in go package github.com/ecies/go","id":"CVE-2023-49292"},"products":["vite"],"published":"2023-12-04","related":[{"cvss_score":5.3,"headline":"Vite Vitejs Improper Access Control","id":"CVE-2025-31125","kev_date_added":"2026-01-22","published":"2025-03-31"},{"cvss_score":8.2,"headline":"Vite: `server.fs.deny` bypass on Windows alternate paths","id":"CVE-2026-53571","kev_date_added":null,"published":"2026-06-22"},{"cvss_score":8.2,"headline":"Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket","id":"CVE-2026-39363","kev_date_added":null,"published":"2026-04-07"},{"cvss_score":8.2,"headline":"Vite has a `server.fs.deny` bypass with queries","id":"CVE-2026-39364","kev_date_added":null,"published":"2026-04-07"},{"cvss_score":7.5,"headline":"Vite dev server option `server.fs.deny` can be bypassed when hosted on case-insensitive filesystem","id":"CVE-2024-23331","kev_date_added":null,"published":"2024-01-19"},{"cvss_score":7.5,"headline":"Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//)","id":"CVE-2023-34092","kev_date_added":null,"published":"2023-06-01"},{"cvss_score":6.5,"headline":"Vite allows any websites to send any requests to the development server and read the response","id":"CVE-2025-24010","kev_date_added":null,"published":"2025-01-20"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-05-29","vendors":["vitejs"]},"summary":"Attackers can inject arbitrary HTML via malicious URLs in Vite dev servers using custom app types, potentially executing code in the browser.","url":"https://insights.sbomify.com/CVE-2023-49293/"}