Intel

AIKIDO-2026-687599

@napi-rs/canvas-linux-x64-musl is vulnerable to Denial of service

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

25

CVE Score

Low

Denial of service

Are you affected? Scan for Free

TL;DR

The getImageData/Surface::read_pixels entry point in src/sk.rs allocates a Rust Vec sized by a 32-bit width * height * 4 and passes it to the native skia_c.cpp readPixels call, which computed the per-row stride as a 32-bit int w * 4; a requested rectangle of at least 2^30 pixels (32768 by 32768 is the smallest square) wraps that computation and causes Skia to write past the undersized buffer, an out-of-bounds write. The width and height values originate from the getImageData rectangle arguments supplied by the calling application code, not from any built-in default; a 16384 by 16384 read still fits. The fix adds explicit range checks (rejecting width/height above i32::MAX or byte length above isize::MAX) before allocating, and casts the C++ stride multiplication to size_t to avoid 32-bit overflow.

How do I fix this?

Upgrade the @napi-rs/canvas-linux-x64-musl package to version 1.0.7 or later.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you call getImageData with a rectangle whose width times height is at least 2^30 pixels.

Versions

0.0.2 - 1.0.6

Fixed in 1.0.7

Background info

@napi-rs/canvas-linux-x64-musl is vulnerable to Denial of service in versions 0.0.2 - 1.0.6.

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