CVE-2026-116583: Seroval: Code injection through a typed array's own constructor property
seroval 1.6.0 up to 1.6.10 writes a typed array as a call to its constructor, and takes the constructor name from a property the data can overwrite. If an app copies untrusted properties onto a typed array, the serialized output can carry attacker code. Fixed in 1.6.11. The advisory rates it Low because the precondition is unusual.
Published Oct 28, 2026 · Analysis Nov 1, 2026
What an attacker can do
Version 1.6.0 changed how seroval finds an object's class, so that objects with their own constructor property serialize correctly. Typed arrays still read the constructor name from the value itself. An own constructor property set from untrusted data replaces the real type name, and seroval writes it into the output without checks. When that output runs in a page, the injected text runs as script.
The affected functions are serialize, serializeAsync, crossSerialize, crossSerializeAsync, crossSerializeStream, the Serializer class and compileJSON. fromJSON and fromCrossJSON are not affected, because they accept only the names of built-in typed arrays. With the compactArrayBufferViews option the same lookup throws a TypeError and writes no code.
The attacker needs the app to serialize a typed array that has an own constructor property from untrusted data. That means code that copies properties from untrusted objects onto a typed array, which is rare. The advisory says the result is script execution in the page that receives the output, so the Low rating reflects the conditions, not the impact.
Who is affected
npm package seroval >= 1.6.0, < 1.6.11. Versions before 1.6.0 are not listed. Check whether your code, or code in a framework that uses seroval, merges untrusted objects into typed arrays such as Uint8Array before serializing.
npm ls serovalseroval
- Ecosystem
- npm
- Affected
- >= 1.6.0, < 1.6.11
- Fixed in
- 1.6.11
- Check
npm ls seroval
How to fix it
Upgrade to seroval 1.6.11:
npm install [email protected]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. For transitive installs, update the parent package or add an overrides entry.
If you cannot upgrade, do not copy properties from untrusted objects onto typed arrays. You can also delete an own constructor property from a typed array before serializing it.
How to tell if you were hit
Search your code for places where Object.assign or similar copies properties from request data onto a typed array that later reaches a seroval serializer. In stored or logged input, look for keys named constructor inside objects that are bound for typed arrays. In rendered output, serialized typed arrays should call a built-in name such as Uint8Array. Anything else in that position points to this flaw.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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.
Questions
- Why is CVE-2026-116583 rated Low in the advisory?
Exploitation needs an app to serialize a typed array with an own constructor property set from untrusted data, which the advisory calls unusual. The impact if it works is script execution.
- Is fromJSON affected?
No. fromJSON and fromCrossJSON accept only the names of built-in typed arrays, so they are not affected.
- How does this differ from the RegExp issue CVE-2026-116582?
That one concerns unescaped
<in RegExp sources. This one concerns the constructor name of typed arrays, fixed in 1.6.11 instead of 1.6.10.
References
Read for this analysis:
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-116580
Seroval: Deserialization invokes attacker-chosen callables: AsyncIteratorFactoryInstance calls source.on(listener) without type check
high7.3Oct 28, 2026CVE-2026-116581
Seroval: fromJSON deserializer trusts node-supplied array length and sequence doneAt (unauthenticated event-loop DoS)
high7.5Oct 28, 2026CVE-2026-116582
Seroval: Script injection through RegExp sources in serialized output
medium4.7Oct 28, 2026CVE-2026-116584
Seroval `fromJSON`/`fromCrossJSON` denial of service via unvalidated array node length
high7.5Oct 28, 2026CVE-2026-104845
Seroval: Memory exhaustion via unchecked TypedArray length in JSON deserialization
high7.5Oct 5, 2026CVE-2026-104846
Seroval: `fromJSON()` Promise thenable assimilation invokes plugin-produced callables (bypass of GHSA-mv8w-475r-vwqw)
critical9.8Oct 5, 2026
