Seroval: Code injection through a typed array's own constructor property
Summary
seroval writes a typed array as a call to its constructor. In affected versions, the constructor name in the output is read from a property that data on the value can replace, and it is written without checks. A typed array that received properties from untrusted data can then put arbitrary code into the serialized output.
Details
Version 1.6.0 changed how seroval finds the class of an object, so that objects with their own constructor property serialize correctly. Typed arrays still took the constructor name from the value itself, so the name could come from the untrusted property instead of the array's real type.
These functions are affected:
serialize,serializeAsynccrossSerialize,crossSerializeAsync,crossSerializeStream- the
Serializerclass compileJSON
fromJSON and fromCrossJSON are not affected: they only accept the names of the built-in typed arrays. With the compactArrayBufferViews option, the same lookup throws a TypeError instead of writing code.
Impact
An application is affected only when it serializes a typed array that has an own constructor property set from untrusted data. That requires code that copies properties from untrusted objects onto a typed array. This is unusual, so the severity is rated Low, even though the result is script execution in the page that receives the output.
Patches
Fixed in 1.6.11. The constructor name now comes from the array's internal type, which properties on the value cannot change. compactArrayBufferViews uses the real type as well.
Workarounds
If you cannot upgrade, do not copy properties from untrusted objects onto typed arrays, or remove an own constructor property from a typed array before serializing it.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | seroval | >= 1.6.0, < 1.6.11 | 1.6.11 |
References
- https://github.com/lxsmnsyc/seroval/security/advisories/GHSA-f86p-h4j2-7qgj
- https://nvd.nist.gov/vuln/detail/CVE-2026-116583
- https://github.com/lxsmnsyc/seroval/commit/1313ebbad9687bc0245e08bfd576376e57e0e5c1
- https://github.com/lxsmnsyc/seroval
- https://github.com/lxsmnsyc/seroval/releases/tag/seroval@1.6.11
- CVSS vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N- Weakness (CWE)
CWE-79, CWE-94- Platform
- npm
- Package
seroval- Disclosed
- 28.10.2026
- Updated
- 28.10.2026 23:17
Sources and licenses
OSV / GitHub Advisory Database - GHSA-f86p-h4j2-7qgj - CC BY 4.0
Vulnerability history: seroval
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 10
- First → latest
- 01.2026 10.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 2
- High 6
- Medium 2
Disclosures per year
- 2026: 10
-
Seroval: Code injection through a typed array's own constructor property this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.