Bug 2556244 (CVE-2026-112949)

Summary: CVE-2026-112949 vitest: Vitest: Cross-site scripting via unescaped mock module URL
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: anujha, aschwart, asoldano, aszczucz, bbaranow, bmaxwell, boliveir, bstansbe, cdrage, csuconic, dbruscin, dlofthou, doconnor, drichtar, dschmidt, eborisov, gtully, istudens, ivassile, iweiss, jlanda, jsherman, kshier, kvanderr, lball, mosmerov, mposolda, msvehla, ngough, nwallace, pberan, pesilva, pjindal, pmackay, rbobbitt, rgemmell, rgodfrey, rmartinc, rstancel, rushinde, simaishi, ssilvert, stcannon, sthorger, tbish, thjenkin, tlavocat, vdosoudi, veshanka, vmuzikar, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in Vitest. An unauthenticated attacker able to connect to the development server can achieve cross-site scripting (XSS) by registering a crafted mock module with an unescaped URL. When a developer loads the affected module in their browser, attacker-controlled JavaScript executes within the context of the development server origin.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2561804, 2561805    
Bug Blocks:    

Description OSIDB Bzimport 2026-10-20 15:33:17 UTC
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.