Intel

AIKIDO-2026-994514

napi is vulnerable to Use After Free

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jun 16, 2026
June 16, 2026

39

CVE Score

Low

Use After Free

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.

How do I fix this?

Upgrade the napi library to the patch version.

Who does this affect?

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

Package

Versions

3.1.0 - 3.9.0

Fixed in 3.9.1

Background info

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

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea