Technical impact
Seroval is a library that converts JavaScript values to string form for use in web pages. The vulnerability occurs when the library serializes a RegExp object built from untrusted input. In versions prior to 1.0.0 and from 1.5.5 through 1.6.10, a RegExp source that contains a less‑than character is output without the necessary escaping for HTML script elements. An attacker crafting such a source can terminate the surrounding script tag and inject arbitrary client‑side code that executes in the context of a page viewed by another user. This yields a classic cross‑site scripting flaw that could compromise user data or allow session hijacking.
Affected Systems
The affected library is lxsmnsyc's Seroval. Versions before 1.0.0 and the range 1.5.5 up to and including 1.6.10 are vulnerable. The issue is fixed in version 1.6.10 and later. Applications that use the serialize, serializeAsync, crossSerialize, crossSerializeAsync, crossSerializeStream, Serializer, or compileJSON APIs to turn RegExp objects into strings and then embed the result in an HTML script element are at risk.
Risk and Exploitability
The CVSS score of 4.7 denotes a moderate severity, but the lack of an EPSS score means it is unclear how often attackers exploit the flaw. The vulnerability is not listed in the CISA KEV catalog, and no known public exploits exist at this time. The attack vector requires that an attacker can influence untrusted input that is turned into a regular expression and then that input is serialized and inserted directly into a script tag, a situation common in browser‑side rendering frameworks. When present, the flaw allows an attacker to execute arbitrary scripts in the victim’s browser.
Github GHSA