CVE-2026-116582
Seroval: Script injection through RegExp sources in serialized output
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
4.7
Seroval: Script injection through RegExp sources in serialized output
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.
- Record
CVE-2026-116582- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79, CWE-116
- Updated
- 2026-11-02
EUVDEUVD-2026-110449
4.7
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.
- Record
EUVD-2026-110449- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-9wx9-5pv9-3349
4.7
Seroval: Script injection through RegExp sources in serialized output
Summary
seroval writes a RegExp as a regular expression literal. In affected versions, the < character in a RegExp source is written without escaping. A source built from untrusted input can then end the HTML <script> element that the serialized output is placed in, and run script in the page.
Details
seroval escapes < in strings, so string values cannot end a <script> element. RegExp sources did not get the same escaping:
- Versions before 1.0.0 wrote the source as is.
- Version 1.5.5 stopped escaping
<inRegExpsources, so that named groups and lookbehinds keep working. This removed the escaping for every<in a source.
These functions are affected:
serialize,serializeAsynccrossSerialize,crossSerializeAsync,crossSerializeStream- the
Serializerclass compileJSON
toJSON, fromJSON, toCrossJSON and fromCrossJSON are not affected, because they never produce JavaScript.
Impact
An application is affected when all of these are true:
- It builds a
RegExpfrom untrusted input that is used as regular expression syntax. Input passed through an escaping helper (such as anescapeRegExpfunction) is not enough to exploit this. - It serializes that
RegExpwith one of the functions above. - It places the output inside an HTML
<script>element, as server rendering usually does.
In that case an attacker can run script in the page of any user who receives that output.
Patches
Fixed in 1.6.10. A RegExp whose source contains < is now written with the RegExp constructor and an escaped string source. Named groups and lookbehinds keep working.
Workarounds
If you cannot upgrade:
- Do not serialize a
RegExpbuilt from untrusted pattern syntax. Send its source and flags as strings, and build theRegExpon the client. - Or reject patterns that contain
<before they reach the serializer.
- Record
GHSA-9wx9-5pv9-3349- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79, CWE-116
- Updated
- 2026-11-02
NVD
4.7
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.
- Record
CVE-2026-116582- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79, CWE-116
- Updated
- 2026-11-02
OSV
4.7
Seroval: Script injection through RegExp sources in serialized output
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.
- Record
CVE-2026-116582- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-116, CWE-79
- Updated
- 2026-11-02
OSVGHSA-9wx9-5pv9-3349
4.7
Seroval: Script injection through RegExp sources in serialized output
Summary
seroval writes a RegExp as a regular expression literal. In affected versions, the < character in a RegExp source is written without escaping. A source built from untrusted input can then end the HTML <script> element that the serialized output is placed in, and run script in the page.
Details
seroval escapes < in strings, so string values cannot end a <script> element. RegExp sources did not get the same escaping:
- Versions before 1.0.0 wrote the source as is.
- Version 1.5.5 stopped escaping
<inRegExpsources, so that named groups and lookbehinds keep working. This removed the escaping for every<in a source.
These functions are affected:
serialize,serializeAsynccrossSerialize,crossSerializeAsync,crossSerializeStream- the
Serializerclass compileJSON
toJSON, fromJSON, toCrossJSON and fromCrossJSON are not affected, because they never produce JavaScript.
Impact
An application is affected when all of these are true:
- It builds a
RegExpfrom untrusted input that is used as regular expression syntax. Input passed through an escaping helper (such as anescapeRegExpfunction) is not enough to exploit this. - It serializes that
RegExpwith one of the functions above. - It places the output inside an HTML
<script>element, as server rendering usually does.
In that case an attacker can run script in the page of any user who receives that output.
Patches
Fixed in 1.6.10. A RegExp whose source contains < is now written with the RegExp constructor and an escaped string source. Named groups and lookbehinds keep working.
Workarounds
If you cannot upgrade:
- Do not serialize a
RegExpbuilt from untrusted pattern syntax. Send its source and flags as strings, and build theRegExpon the client. - Or reject patterns that contain
<before they reach the serializer.
- Record
GHSA-9wx9-5pv9-3349- CVSS 3.1
- 4.7 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-116, CWE-79
- Updated
- 2026-11-02
OSVCLSA-2026-1793698169 No score
TuxCare security update for seroval (1 CVE)
TuxCare rebuilt seroval to address 1 CVE. Fixed in 1.5.6-tuxcare.3.
- Record
CLSA-2026-1793698169- Updated
- 2026-11-03
Affected products
Affected packages
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-116582 is a medium vulnerability (CVSS 4.7) in Lxsmnsyc Seroval, published October 26, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.19%, the 8th percentile. Fixed in seroval 1.6.10.
References
github.com/lxsmnsyc/seroval/security/advisories/GHSA-9wx9-5pv9-3349
github.com/lxsmnsyc/seroval/commit/f94ee0b63936dae954ff50d5b5e8ea7cb9b284e6
github.com/lxsmnsyc/seroval/releases/tag/[email protected]
nvd.nist.gov/vuln/detail/CVE-2026-116582
github.com/advisories/GHSA-9wx9-5pv9-3349
github.com/CVEProject/cvelistV5/tree/main/cves/2026/116xxx/CVE-2026-116582.json
github.com/lxsmnsyc/seroval