Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted regex pattern as untrusted input
-
ExploitApp serializes RegExp source unescaped into inline <script>
-
ExecutionInjected '</script>' terminates element and adds attacker script
-
ImpactScript executes in victim's browser session
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a specific integration: the downstream application must (1) construct a RegExp whose source is built from untrusted input used as regular-expression syntax (input run through an escapeRegExp-style helper is NOT sufficient to exploit), (2) serialize that RegExp with one of the JavaScript-output APIs - serialize, serializeAsync, crossSerialize, crossSerializeAsync, crossSerializeStream, the Serializer class, or compileJSON - and (3) embed the serialized output inside an HTML <script> element, as server-side rendering typically does. Limiting factors: the toJSON, fromJSON, toCrossJSON and fromCrossJSON APIs are NOT affected because they never emit JavaScript; a victim user must load the rendered page (UI:R); and only seroval versions before 1.0.0 and from 1.5.5 up to (not including) 1.6.10 are vulnerable. Applications that send RegExp source/flags as strings and rebuild on the client, or that reject patterns containing '<', are not exploitable. |
| Impact | This is a genuine but conditional XSS (CWE-79/CWE-116) in the seroval serialization library, and the signals point to low-to-moderate real-world priority rather than an emergency. The CVSS 3.1 vector (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N) yields only 4.7 (Medium): network-reachable and unauthenticated, but with high attack complexity (the application must build a RegExp directly from untrusted pattern syntax and embed the serialized output in a script element) and required user interaction (a victim must load the rendered page). EPSS is low at 0.19% (8th percentile), there is no CISA KEV listing, and no public exploit is identified in the input, which is consistent with a vulnerability that is only exploitable in a specific, non-default integration pattern rather than broadly. The vuln.today decision label is 'this_month', aligning with the picture of a real issue to patch on a normal cadence, not a drop-everything event. The signals are mutually consistent (low EPSS, no KEV, Medium CVSS, this_month) with no major conflicts; the main caveat is that exploitability depends entirely on how a downstream application uses the library, which the raw scores cannot capture. |
| Exploit ScenarioDerived | A server-rendered application lets users supply a regular-expression pattern (for example a search filter), builds a RegExp from that raw input, serializes it with serialize/crossSerialize/compileJSON, and writes the result into an inline HTML <script> element. An attacker submits a pattern whose source contains '</script><script>...' so the unescaped '<' terminates the script element and injects attacker-controlled script that runs in the browser of any other user who views the rendered page. No public exploit is identified in the input, though the advisory and patch test cases illustrate the unsafe sources. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 28, 2026
Script injection in seroval's JavaScript-output serializers lets a RegExp whose source contains '<' terminate an HTML <script> element and execute attacker script in the rendered page, affecting releases before 1.0.0 and from 1.5.5 up to but not including 1.6.10. The flaw only materializes in applications that build regular-expression syntax from untrusted input, serialize that RegExp through serialize, serializeAsync, crossSerialize, crossSerializeAsync, crossSerializeStream, Serializer or compileJSON, and embed the output inside a script element as server-side rendering commonly does; a victim must then load that page (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N, 4.7). EPSS is low (0.19%, 8th percentile), the issue is not in CISA KEV, and no public exploit has been identified at time of analysis, though the vendor has released 1.6.10 with the fix.
RemediationAI
Upgrade seroval to 1.6.10, which is the vendor-released patch and serializes any RegExp source containing '<' through the RegExp constructor with an escaped string source, preserving named groups and lookbehinds; see the advisory at https://github.com/lxsmnsyc/seroval/security/advisories/GHSA-9wx9-5pv9-3349 and the release at https://github.com/lxsmnsyc/seroval/releases/tag/seroval@1.6.10. If upgrading is not immediately possible, the vendor's workarounds are to avoid serializing a RegExp built from untrusted pattern syntax - instead send the source and flags as plain strings and construct the RegExp on the client - or to reject any pattern containing '<' before it reaches the serializer, with the trade-off that legitimate patterns using '<' or lookbehind/named-group syntax containing that character will be refused and client-side reconstruction shifts validation responsibility to the browser code. Note that running untrusted input through an escapeRegExp-style helper is explicitly not sufficient protection. Because exploitation additionally requires the application to embed the serialized output inside an HTML <script> element, review server-rendering paths that inject serializer output for this pattern, and treat this as a this-month priority item consistent with the low EPSS score (0.19%) and the absence of KEV listing.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
seroval is an npm serialization library that stringifies JavaScript values beyond JSON's capabilities, emitting actual JavaScript literals. It correctly escapes '<' inside string values but historically emitted RegExp objects as regular-expression literals (for example /pattern/flags), where the source text passes through verbatim. Releases before 1.0.0 wrote the source unescaped, and 1.5.5 deliberately stopped escaping '<' in RegExp sources so that named groups and lookbehinds kept working - which removed the escaping for every '<' in a source. The underlying weakness is CWE-79 (with CWE-116 improper output encoding): the serialized literal, when placed inside an HTML <script> element, can contain a sequence such as [</script><script>alert(1)//] that closes the element and injects new markup, script context is then attacker-controlled in the receiving page. The fix in commit f94ee0b checks whether the internal escaped source contains \x3C and, if so, emits 'new RegExp("...","flags")' via the constructor instead of a literal, so no raw '<' reaches the output while named groups and lookbehinds keep functioning. The JSON-oriented APIs (toJSON, fromJSON, toCrossJSON, fromCrossJSON) never produce JavaScript and are therefore out of scope, and inputs already passed through an escapeRegExp-style helper do not reach the serializer as live regex syntax, so that path is not sufficient to exploit.
Know when Seroval gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
AC:H because the app must serialize a RegExp built directly from untrusted pattern syntax into a script element; UI:R since a victim must view the page; S:C and C:L/I:L for script execution in another user's browser.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Deserialization of attacker-controlled JSON in plugin-capable Seroval releases 0.12.0 through 1.6.1 lets a remote unauth
Deserialization in Seroval prior to 1.6.8 accepts sequence nodes whose done and throw indices are unvalidated, so a craf
Denial of service in Seroval versions prior to 1.6.3 allows unauthenticated remote attackers to exhaust CPU and memory b
Denial of service in the seroval npm package (versions 1.4.1 through 1.6.7) lets an unauthenticated remote attacker who
Arbitrary code execution in Seroval versions 1.4.0 and below allows authenticated attackers to execute malicious JavaScr
Seroval versions 1.4.0 and below are vulnerable to denial of service through malformed deserialization payloads that spe
Seroval versions 1.4.0 and below are vulnerable to denial of service attacks due to unbounded recursion when serializing
Seroval versions 1.4.0 and below allow remote attackers to cause denial of service through maliciously crafted RegExp pa
Seroval deserialization can invoke attacker-chosen callables when an application passes untrusted input to fromJSON and
Seroval is affected by improperly controlled modification of object prototype attributes (prototype pollution) (CVSS 7.3
Code injection in the Seroval JavaScript serialization library 1.6.0 through 1.6.10 lets attacker-controlled text become
EUVD-2026-110449
GHSA-9wx9-5pv9-3349
NVD
CVE.org
EPSS
Exploit-DB