npm
CVE-2026-116583
Seroval: Code injection through a typed array's own constructor property
- Severity
- Medium
- Published
- 28 Oct 2026
- Last changed
- 28 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 1.6.11
- Exploit chance
- 0.4% in the next 30 daysHigher than 28% of CVEs. EPSS by FIRST, 24 Nov 2026
- Also known as
- GHSA-f86p-h4j2-7qgj
- Sources
- OSV.dev and GitHub
Description
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.
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, serializeAsync
- crossSerialize, crossSerializeAsync, crossSerializeStream
- the Serializer class
- 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.
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
| Software | Affected versions |
|---|---|
serovalnpm · osv:npm:seroval |
|
About seroval
- Weekly downloads (npm)
- 42,273,924npm, 23 Nov 2026
Vulnerabilities in seroval
- In our list
- 5
- Published in the last 12 months
- 5
- Critical, last 12 months
- 0
- High, last 12 months
- 3
- Known exploited
- 0
- CVE-2026-116582Seroval: Script injection through RegExp sources in serialized outputMedium 4.7 28 Oct 2026
- CVE-2026-116581Seroval: fromJSON deserializer trusts node-supplied array length and sequence doneAt (unauthenticated event-loop DoS)High 7.5 28 Oct 2026
- CVE-2026-116584Seroval `fromJSON`/`fromCrossJSON` denial of service via unvalidated array node lengthHigh 7.5 28 Oct 2026
- CVE-2026-116580Seroval: Deserialization invokes attacker-chosen callables: AsyncIteratorFactoryInstance calls source.on(listener) without type checkHigh 7.3 28 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-116583
- GitHub Advisory Database https://github.com/advisories/GHSA-f86p-h4j2-7qgj