@napi-rs/canvas-linux-x64-musl is vulnerable to Denial of service
25
CVE Score
Low
Denial of service
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.
Upgrade the @napi-rs/canvas-linux-x64-musl package to version 1.0.7 or later.
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.
0.0.2 - 1.0.6
Fixed in 1.0.7@napi-rs/canvas-linux-x64-musl is vulnerable to Denial of service in versions 0.0.2 - 1.0.6.
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.