Intel

AIKIDO-2026-994514

napi is vulnerable to Use After Free

Use After Free Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Today

39

Low Risk

This Affects:

RUSTnapi
3.1.0 - 3.9.0
Fixed in 3.9.1
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

napi is vulnerable to Use After Free in versions 3.1.0 - 3.9.0.

How to fix this

Upgrade the napi library to the patch version.