{"id":"CVE-2026-116582","aliases":["CLSA-2026-1793698169","EUVD-2026-110449","GHSA-9wx9-5pv9-3349"],"status":"published","title":"Seroval: Script injection through RegExp sources in serialized output","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.","severity":{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00188,"percentile":0.08463,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-116","CWE-79"],"published":"2026-10-26T20:46:46Z","modified":"2026-11-03T13:30:02Z","fixes":[{"ecosystem":"npm","package":"seroval","fixed_in":["1.6.10","1.0.0"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"seroval","fixed_in":["1.5.6-tuxcare.3"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"seroval","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.5.5"},{"fixed":"1.6.10"}]}]},{"source":"ghsa","ecosystem":"npm","package":"seroval","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.0"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"seroval","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.5.6-tuxcare.0"},{"fixed":"1.5.6-tuxcare.3"}]}],"versions":["1.5.6","1.5.6-tuxcare.1","1.5.6-tuxcare.2"]},{"source":"osv","ecosystem":"npm","package":"seroval","ranges":[{"type":"SEMVER","events":[{"introduced":"1.5.5"},{"fixed":"1.6.10"}]}]},{"source":"osv","ecosystem":"npm","package":"seroval","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.0.0"}]}]}],"products":[{"vendor":"lxsmnsyc","product":"seroval"}],"references":[{"url":"https://github.com/lxsmnsyc/seroval/security/advisories/GHSA-9wx9-5pv9-3349","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/lxsmnsyc/seroval/commit/f94ee0b63936dae954ff50d5b5e8ea7cb9b284e6","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/lxsmnsyc/seroval/releases/tag/seroval@1.6.10","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-116582","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-9wx9-5pv9-3349"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/116xxx/CVE-2026-116582.json","tags":["advisory"]},{"url":"https://github.com/lxsmnsyc/seroval","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-116582","title":"Seroval: Script injection through RegExp sources in serialized output","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.","status":"published","published":"2026-10-26T20:46:46.069Z","modified":"2026-10-30T15:16:29.46Z","cvss":[{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-79","CWE-116"],"updated_at":"2026-11-02T14:20:03.827373Z"}],"euvd":[{"id":"EUVD-2026-110449","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.","status":"published","published":"2026-10-26T20:46:46Z","modified":"2026-10-30T15:16:29Z","cvss":[{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T16:59:06.268136Z"}],"ghsa":[{"id":"GHSA-9wx9-5pv9-3349","title":"Seroval: Script injection through RegExp sources in serialized output","description":"### Summary\n\nseroval writes a `RegExp` as a regular expression literal. In affected versions, the `\u003c` character in a `RegExp` source is written without escaping. A source built from untrusted input can then end the HTML `\u003cscript\u003e` element that the serialized output is placed in, and run script in the page.\n\n### Details\n\nseroval escapes `\u003c` in strings, so string values cannot end a `\u003cscript\u003e` element. `RegExp` sources did not get the same escaping:\n\n- Versions before 1.0.0 wrote the source as is.\n- Version 1.5.5 stopped escaping `\u003c` in `RegExp` sources, so that named groups and lookbehinds keep working. This removed the escaping for every `\u003c` in a source.\n\nThese functions are affected:\n\n- `serialize`, `serializeAsync`\n- `crossSerialize`, `crossSerializeAsync`, `crossSerializeStream`\n- the `Serializer` class\n- `compileJSON`\n\n`toJSON`, `fromJSON`, `toCrossJSON` and `fromCrossJSON` are not affected, because they never produce JavaScript.\n\n### Impact\n\nAn application is affected when all of these are true:\n\n1. 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.\n2. It serializes that `RegExp` with one of the functions above.\n3. It places the output inside an HTML `\u003cscript\u003e` element, as server rendering usually does.\n\nIn that case an attacker can run script in the page of any user who receives that output.\n\n### Patches\n\nFixed in 1.6.10. A `RegExp` whose source contains `\u003c` is now written with the `RegExp` constructor and an escaped string source. Named groups and lookbehinds keep working.\n\n### Workarounds\n\nIf you cannot upgrade:\n\n- Do not serialize a `RegExp` built from untrusted pattern syntax. Send its source and flags as strings, and build the `RegExp` on the client.\n- Or reject patterns that contain `\u003c` before they reach the serializer.","status":"published","published":"2026-10-28T21:17:31Z","modified":"2026-10-28T21:17:32Z","cvss":[{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79","CWE-116"],"updated_at":"2026-11-02T14:41:39.926569Z"}],"nvd":[{"id":"CVE-2026-116582","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.","status":"published","published":"2026-10-26T21:18:16.267Z","modified":"2026-10-30T16:17:40.887Z","cvss":[{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-79","CWE-116"],"updated_at":"2026-11-02T14:13:03.746397Z"}],"osv":[{"id":"CVE-2026-116582","title":"Seroval: Script injection through RegExp sources in serialized output","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.","status":"published","published":"2026-10-26T20:46:46.069Z","modified":"2026-11-01T02:30:41.567773674Z","cvss":[{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-116","CWE-79"],"updated_at":"2026-11-02T15:44:56.675758Z"},{"id":"GHSA-9wx9-5pv9-3349","title":"Seroval: Script injection through RegExp sources in serialized output","description":"### Summary\n\nseroval writes a `RegExp` as a regular expression literal. In affected versions, the `\u003c` character in a `RegExp` source is written without escaping. A source built from untrusted input can then end the HTML `\u003cscript\u003e` element that the serialized output is placed in, and run script in the page.\n\n### Details\n\nseroval escapes `\u003c` in strings, so string values cannot end a `\u003cscript\u003e` element. `RegExp` sources did not get the same escaping:\n\n- Versions before 1.0.0 wrote the source as is.\n- Version 1.5.5 stopped escaping `\u003c` in `RegExp` sources, so that named groups and lookbehinds keep working. This removed the escaping for every `\u003c` in a source.\n\nThese functions are affected:\n\n- `serialize`, `serializeAsync`\n- `crossSerialize`, `crossSerializeAsync`, `crossSerializeStream`\n- the `Serializer` class\n- `compileJSON`\n\n`toJSON`, `fromJSON`, `toCrossJSON` and `fromCrossJSON` are not affected, because they never produce JavaScript.\n\n### Impact\n\nAn application is affected when all of these are true:\n\n1. 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.\n2. It serializes that `RegExp` with one of the functions above.\n3. It places the output inside an HTML `\u003cscript\u003e` element, as server rendering usually does.\n\nIn that case an attacker can run script in the page of any user who receives that output.\n\n### Patches\n\nFixed in 1.6.10. A `RegExp` whose source contains `\u003c` is now written with the `RegExp` constructor and an escaped string source. Named groups and lookbehinds keep working.\n\n### Workarounds\n\nIf you cannot upgrade:\n\n- Do not serialize a `RegExp` built from untrusted pattern syntax. Send its source and flags as strings, and build the `RegExp` on the client.\n- Or reject patterns that contain `\u003c` before they reach the serializer.","status":"published","published":"2026-10-28T21:17:31Z","modified":"2026-10-28T21:30:04.992414732Z","cvss":[{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-116","CWE-79"],"updated_at":"2026-11-02T15:46:44.225359Z"},{"id":"CLSA-2026-1793698169","title":"TuxCare security update for seroval (1 CVE)","description":"TuxCare rebuilt seroval to address 1 CVE. Fixed in 1.5.6-tuxcare.3.","status":"published","published":"2026-11-03T10:29:30Z","modified":"2026-11-03T13:30:02.615324191Z","updated_at":"2026-11-03T14:04:50.729288Z"}]}}
