Technical impact
Seroval, a JavaScript stringification library, can embed arbitrary code into its output when it processes a TypedArray that contains an attacker‑controlled own constructor property. The value of this property is written directly into the emitted JavaScript string, resulting in code execution in the context that consumes the output. The flaw reflects classic code injection (CWE‑79) and unsanitized user input leading to code execution (CWE‑94). Because the library is designed for client‑side use, the compromise can affect end‑user browsers or any JavaScript runtime that interprets the serialized payload. The CVSS score of 5.3 places the vulnerability in the moderate range, indicating that the impact is limited to attackers who can supply or manipulate the TypedArray passed to the serialization API.
Affected Systems
Vendors – any project that uses the open‑source 'Seroval' library. Versions from 1.6.0 through 1.6.11 are affected and can be identified by the commit or release references. The flaw exists in all JavaScript‑output functions such as serialize, serializeAsync, crossSerialize, crossSerializeAsync, crossSerializeStream, Serializer, and compileJSON. Organizations embedding these functions without sanitizing input objects that might contain a custom constructor property are at risk.
Risk and Exploitability
The vulnerability carries a CVSS score of 5.3 and has no EPSS data, so the quantified likelihood of exploitation is unknown. It is not listed in the CISA KEV catalog. The attack vector is likely a client‑side code injection: an attacker who can supply a TypedArray with a malicious constructor property to the serialization API can cause the output payload to include executable code that runs in whatever environment consumes the string. The precise exploitation requires the attacker to control the input object, but once achieved it can lead to arbitrary JavaScript execution, affecting confidentiality, integrity, and potentially availability of the consuming application.
Github GHSA