napi is vulnerable to Use After Free
39
CVE Score
Low
Use After Free
The napi crate mishandles finalize callbacks for N-API class Reference values and external Latin-1/UTF-16 strings. Allocating finalize state with Rc while GC teardown reinterprets the same pointer as Arc causes undefined behavior and can abort the Node process under class reference churn. On WASI and similar targets, external string helpers could double-free or use freed buffers when V8 or emnapi copies string data synchronously. Version 3.9.1 unifies finalize callbacks on Arc and reworks external string ownership so buffers stay valid and finalizers run once.
Upgrade the napi library to the patch version.
You are affected if you are using a version that falls within the vulnerable range.
3.1.0 - 3.9.0
Fixed in 3.9.1napi is vulnerable to Use After Free in versions 3.1.0 - 3.9.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.