Miggo Logo

CVE-2025-27793: Vega vulnerable to Cross-site Scripting via RegExp.prototype[@@replace]

5.3

CVSS Score
4.0

Basic Information

EPSS Score
0.22254%
Published
3/27/2025
Updated
3/27/2025
KEV Status
No
Technology
TechnologyJavaScript

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 NameEcosystemVulnerable VersionsFirst Patched Version
veganpm< 5.32.05.32.0
vega-functionsnpm< 5.17.05.17.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The security patch adds validation to the replace function in vega-functions to restrict pattern arguments to only strings/RegExps. This indicates:

  1. The vulnerability existed in the unpatched replace function
  2. The function processes user-controllable input (pattern argument)
  3. The exploit POC directly triggers through this function via the 'update' signal handler
  4. 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

## Imp**t Us*rs runnin* V***/V***-lit* JSON ***initions *oul* run un*xp**t** J*v*S*ript *o** w**n *r*win* *r*p*s, unl*ss t** li*r*ry is us** wit* t** `v***-int*rpr*t*r`. ## Work*roun*s - Us* `v***` wit* [*xpr*ssion int*rpr*t*r](*ttps://v***.*it*u*

Reasoning

T** s**urity p*t** ***s v*li**tion to t** r*pl*** *un*tion in v***-*un*tions to r*stri*t p*tt*rn *r*um*nts to only strin*s/R***xps. T*is in*i**t*s: *. T** vuln*r**ility *xist** in t** unp*t**** r*pl*** *un*tion *. T** *un*tion pro**ss*s us*r-*ontrol