CVE-2025-27793: Vega vulnerable to Cross-site Scripting via RegExp.prototype[@@replace]
5.3
CVSS Score
4.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.22254%
CWE
Published
3/27/2025
Updated
3/27/2025
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| vega | npm | < 5.32.0 | 5.32.0 |
| vega-functions | npm | < 5.17.0 | 5.17.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The security patch adds validation to the replace function in vega-functions to restrict pattern arguments to only strings/RegExps. This indicates:
- The vulnerability existed in the unpatched replace function
- The function processes user-controllable input (pattern argument)
- The exploit POC directly triggers through this function via the 'update' signal handler
- The function would appear in stack traces when processing malicious replace patterns
No other functions were modified in the provided patch, and the reproduction steps specifically target this string replacement mechanism.