structured-clone-es is vulnerable to Improper Control of Generation of Code ('Code Injection')
60
CVE Score
Medium
Improper Control of Generation of Code ('Code Injection')
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.
Upgrade the structured-clone-es library to the patch version.
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.
0.0.1 - 2.0.0
Fixed in 2.0.1structured-clone-es is vulnerable to Improper Control of Generation of Code ('Code Injection') in versions 0.0.1 - 2.0.0.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.