structured-clone-es is vulnerable to Improper Control of Generation of Code ('Code Injection')
60
Medium Risk
The deserialize function reconstructs values by calling new globalThis[name](message) and new globalThis[type](value), where the constructor name comes from the serialized input. When an application passes attacker-controlled serialized data to deserialize or parse, an attacker can request constructors such as Function and obtain a live function from the payload (new Function(message)), enabling code execution when that value is later invoked. Other globals could also be abused for denial of service or unexpected side effects. The patch restricts deserialization to allow-lists of safe Error subclasses and typed-array / primitive wrappers.
You are affected if you are using a version that falls within the vulnerable range and you pass untrusted data to the exported deserialize or parse methods.
structured-clone-es is vulnerable to Improper Control of Generation of Code ('Code Injection') in versions 0.0.1 - 2.0.0.
Upgrade the structured-clone-es library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant