Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93058 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47983 invoked from network); 3 May 2016 23:22:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 May 2016 23:22:38 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.41 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.41 mail-qg0-f41.google.com Received: from [209.85.192.41] ([209.85.192.41:33008] helo=mail-qg0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/1B-03860-DB239275 for ; Tue, 03 May 2016 19:22:37 -0400 Received: by mail-qg0-f41.google.com with SMTP id f92so15709565qgf.0 for ; Tue, 03 May 2016 16:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=VmuHG0exsZprstrUeU1L1/+HvTSUhaz5FAqEX9slnEk=; b=Ub2ZqIca/B5+JKeoOJ9wBnXtDTPM9CVJwV/QNLitprJ35ndvK4G2l6BBHnJ87hEySq 3BR2vv53JMQIPeV2MIt+UJBpU2KvUMSqk8y/mPIkI8ignEJkK369r0LNSAvSXpM1xkN9 LyvpDfwN+bpEOXw7BoqHMEvf3h4hF5/qSnF+17zF3ucBZsst0NP2Oz+VtWf96ihOaGHW 9t2TIsCuzy63w1jju+qxU7RCOJFaYLpX/u10uWrLN//6KwWS9iKKCfjE8G8b2RTwA6ok 68MIlVodKHEwJ+DPNGFFY/KWEkQkjNLsn9K//FeCJIIJVkCgxdxO1q7feYloysgA4HVc K95A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=VmuHG0exsZprstrUeU1L1/+HvTSUhaz5FAqEX9slnEk=; b=X7SDssOzWhUSfrlRSGY87Mo4J+l1yPKFTbb/F76psW4VigpooWzDh9m/4U4nZ+SRnT tsbYWSf0adxbikb3WGPs3spBmeVlpDB/A242CFi8ra5s7GHj6dSEX+pyMQCDKAOYyOTj 3I0rHRSsgAyA+pOlD1vJMqlQ0l+v9hzKkRDV3l8GnrMMPBL4N7Wed3PKpOfQCs6nN1c4 EwqvymYtl/D4fo1M1ZC0FUavMKCB9+SgrYv55lPsp0Qfm9jvF12+QSBosJESVbsRjZwD USI5F1sIMz/Em0+Gfo1hRyhV0CwPaHC2Yos4iovsoiGJsu/U3cSsLZfiFb9zWGddF2Hl r4fg== X-Gm-Message-State: AOPr4FW6dFAmzvYP8IbocE3WnMfLWeYiqiYwvmf4naQFr2b1GLQRfyLAfSIBWL93LamDzpsMGk6rqKcUoNHkWw== X-Received: by 10.140.104.146 with SMTP id a18mr2219514qgf.26.1462317754943; Tue, 03 May 2016 16:22:34 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.140.27.133 with HTTP; Tue, 3 May 2016 16:21:55 -0700 (PDT) In-Reply-To: References: Date: Wed, 4 May 2016 08:21:55 +0900 X-Google-Sender-Auth: KtlRuMjI2LyJmo_r6Xo5eVkEu4g Message-ID: To: Dan Ackroyd Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] ImageMagick vulnerability From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Dan, On Wed, May 4, 2016 at 7:33 AM, Dan Ackroyd wrote: > Sorry for being off-topic, but as the maintainer for the Imagick > extension I feel it necessary to do my best impression of Paul Revere* > and warn people of an alleged vulnerability in the underlying > ImageMagick library. Not at all. Thank you for letting us know! Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net > > Apparently servers that use ImageMagick to process any user uploaded > images are vulnerable to a remote code execution attack. Ways to > mitigate this vulnerability are at: https://imagetragick.com/ which > include: > > ####### > > Verify that all image files begin with the expected "magic bytes" > corresponding to the image file types you support before sending them > to ImageMagick for processing. > > Use a policy file to disable the vulnerable ImageMagick coders. The > global policy for ImageMagick is usually found in =E2=80=9C/etc/ImageMagi= ck=E2=80=9D. > The below policy.xml example will disable the coders EPHEMERAL, URL, > MVG, and MSL. > > > > > > > > > > ####### > > I believe restarting any PHP process that would have loaded the > Imagick extension is required to ensure this mitigation takes effect. > > For the record, I do not know any more details about the > vulnerability. Nor do I believe there are any mitigation step that > could or should be taken in the Imagick extension code. > > As an aside, I do recommend only processing images in a locked down > 'background worker' process, rather directly in the web server; I'm > not sure if that would help in for this particular vulnerability, but > it is usually a good idea.