CVE-2026-116582

Seroval: Script injection through RegExp sources in serialized output

Published Oct 26, 2026 CVSS 3.1 · 4.7 Medium EPSS < 1% KEV · Not listed
Description
Seroval facilitates JavaScript value stringification, including complex structures beyond JSON.stringify capabilities. Prior to 1.0.0 and from 1.5.5 until 1.6.10, the JavaScript-output APIs serialize a RegExp source containing a less-than character without the escaping needed for an HTML script element. An application is affected when it builds regular expression syntax from untrusted input, serializes that RegExp through serialize, serializeAsync, crossSerialize, crossSerializeAsync, crossSerializeStream, Serializer, or compileJSON, and embeds the result in an HTML script element. The crafted source can terminate the element and execute script in the page received by another user. This issue is fixed in version 1.6.10.

Analysis

AI-generated

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.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Seroval to version 1.6.10 or newer.
  • If an upgrade is not immediately possible, avoid serializing RegExp objects that originate from untrusted input; instead restrict inputs or sanitize them to eliminate '<' characters.
  • Refrain from embedding the serialized RegExp output into HTML script elements; use safer rendering methods or escape the output before inclusion.

Generated by OpenCVE AI on October 26, 2026 at 23:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-9wx9-5pv9-3349 Seroval: Script injection through RegExp sources in serialized output
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Lxsmnsyc
Lxsmnsyc seroval
Vendors & Products Lxsmnsyc
Lxsmnsyc seroval
Type Values Removed Values Added
Description Seroval facilitates JavaScript value stringification, including complex structures beyond JSON.stringify capabilities. Prior to 1.0.0 and from 1.5.5 until 1.6.10, the JavaScript-output APIs serialize a RegExp source containing a less-than character without the escaping needed for an HTML script element. An application is affected when it builds regular expression syntax from untrusted input, serializes that RegExp through serialize, serializeAsync, crossSerialize, crossSerializeAsync, crossSerializeStream, Serializer, or compileJSON, and embeds the result in an HTML script element. The crafted source can terminate the element and execute script in the page received by another user. This issue is fixed in version 1.6.10.
Title Seroval: Script injection through RegExp sources in serialized output
Weaknesses CWE-116
CWE-79
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-116

    Improper Encoding or Escaping of Output

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 30, 2026, 3:16 PM
Reserved
Oct 26, 2026, 3:03 PM
Status
Deferred
Published
Oct 26, 2026, 9:18 PM
Modified
Oct 30, 2026, 4:17 PM
Severity
Moderate
Public date
Oct 26, 2026, 8:46 PM