napi is vulnerable to Double Free
81
High Risk
The PromiseRaw then, catch, and finally methods box a Rust callback and pass a raw pointer to a native trampoline that unconditionally reconstructs and drops the box on every invocation. Because JavaScript resolves then by name from the promise object, untrusted code can override Promise.prototype.then or supply a custom thenable that invokes the callback more than once. Repeated invocation double-frees the boxed callback, and finally can additionally leak memory depending on the invocation pattern. The fix redesigns callback ownership and finalization and adds error-path cleanup.
You are affected if you are using a version that falls within the vulnerable range and your native addon returns a PromiseRaw whose then, catch, or finally can be driven by untrusted JavaScript.
napi is vulnerable to Double Free in versions 3.0.0 - 3.12.1.
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