napi is vulnerable to Type Confusion
81
High Risk
Object::unwrap::<T>(), Object::remove_wrapped::<T>(), and their deprecated compat-mode twins validate a payload by reading a TypeId from its first bytes, which only holds for payloads created by Object::wrap. When a JavaScript-controlled object is passed instead, the code reads the TypeId from an incompatible allocation and can read past its end, then dereferences or detaches the forged payload. This yields out-of-bounds heap reads and JavaScript-forgeable out-of-bounds writes. The fix records wrapped payloads in a registry and checks membership before any TypeId read.
You are affected if you are using a version that falls within the vulnerable range and your add-on passes JavaScript-controlled objects to unwrap or remove_wrapped.
napi is vulnerable to Type Confusion in versions 2.0.0 - 3.12.3.
Upgrade the napi 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
ISO 42001Compliant© All Intel data is openly available and commercially licensed.