I would like to report Pixel flood attack in jimp
It allows flooding the memory and causing DoS by uploading a crafted image (5kb image), and the Jimp module will tries to allocate 4128062500 pixels into memory.
module name: jimpversion:<=0.10.1npm page: https://www.npmjs.com/package/jimp
> An image processing library for Node written entirely in JavaScript, with zero native dependencies.
1,053,700 Weekly Downloads
> The jimp module will load the pixel from the image file to the memory, and processing the image in order to get a new image file such as resize, rotate, blur, etc. The jimp using EXIF data for picture orientation, which was causing run out of memory in the system. The attacker could manipulate the exif data in the image file such as change the image pixel to 64250x64250pixels. If the jimp module loaded the crafted image, it tries to allocate 4128062500 pixels into memory.
npm install --save jimp
var Jimp = require('jimp');
Jimp.read('lottapixel.jpg', (err, lenna) => {
if (err) throw err;
lenna
.resize(256, 256) // resize
.quality(60) // set JPEG quality
.greyscale() // set greyscale
.write('image-small-bw.jpg'); // save
});
The output will display the error message like below when the memory is exhausted.
>FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
> Disable ImageMagick’s EXIF orientation.
https://hackerone.com/reports/390
Denail of Service