Loading advisory.
Loading advisory.
Seroval: Script injection through RegExp sources in serialized output
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.
Published 2026-10-26 20:46 UTC · Modified 2026-10-30 15:16 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| seroval | npm | >= 1.5.5, < 1.6.10 < 1.0.0 | 1.6.10, 1.0.0 | npm install seroval@1.6.10npm install seroval@1.0.0 |
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.
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 < in RegExp sources, so that named groups and lookbehinds keep working. This removed the escaping for every < in a source.
These functions are affected:
serialize, serializeAsync
crossSerialize, crossSerializeAsync, crossSerializeStream
the Serializer class
compileJSON
toJSON, fromJSON, toCrossJSON and fromCrossJSON are not affected, because they never produce JavaScript.
An application is affected when all of these are true:
It builds a RegExp from untrusted input that is used as regular expression syntax. Input passed through an escaping helper (such as an escapeRegExp function) is not enough to exploit this.
It serializes that RegExp with 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.
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.
If you cannot upgrade:
Do not serialize a RegExp built from untrusted pattern syntax. Send its source and flags as strings, and build the RegExp on the client.
Or reject patterns that contain < before they reach the serializer.
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.002 on 2026-11-24 to 0.003 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.002 | first score | v2026.06.15 |
| 2026-11-26 | 0.003 | 0.002 | v2026.06.15 |