Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93057 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44670 invoked from network); 3 May 2016 22:33:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 May 2016 22:33:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.161.177 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.161.177 mail-yw0-f177.google.com Received: from [209.85.161.177] ([209.85.161.177:33190] helo=mail-yw0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BE/AA-03860-A4729275 for ; Tue, 03 May 2016 18:33:46 -0400 Received: by mail-yw0-f177.google.com with SMTP id t10so50685278ywa.0 for ; Tue, 03 May 2016 15:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to :content-transfer-encoding; bh=XiARwBZsTQRhOpueiCDmHCCbl6TNGC9eLrXlkEcRiv0=; b=SGjZFOzsGPcaGpziScJRjoCUReAvY9H1vUZMs9XN9AXojCDmpMNtkb9162oJK8Fxs+ 6dZfYKwyfskoELMeTVFPwJF0JtCLt/swW1d0MlkLwWovVu9sNLaITXO5MraJ0xOEkGFY flb3/QLhDQd8+KwHisQQN/4IygFJY0O1iwyUoJLQasaLup4JuLRJ0z0lzkk9jLvJbnul I8SZl0QP7jisvUDELlAKtRGM5IMjBwehA79N8Zb5fR41PdcPSJWGrZUuY/RGa1OWVHWH BtHOhd4Ovnenpns5NmcyO/DTgg5gE97poeHYa2FP3VGKOyAL26sPFUnIXFZCNuOclUDY rqWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-transfer-encoding; bh=XiARwBZsTQRhOpueiCDmHCCbl6TNGC9eLrXlkEcRiv0=; b=J4kcc3pjhnrbnpddA1us6VcNR1t+E8xcnyCDcpGGcQ/q9+5X4laeAcbv/uNHmTC6YA Ia/7aWtUVlM+B4IZVnsOHMw/hXIUJrcCgTYrJCiR4X6QAkF8iEn+BXC0f4VcvYWRqZKd h9HSsbqh4IDx2/l29tyM/H3NAKJy0Bp0Zl2ipLPTAOPZTBCq7aWbUe/ILJ0PEC0mz5a3 b2caWPzggX5HJlD8JHUwZPvJA+IOCAbfK9F3TNfQCn0atwWHiE5Juc0u9qNsBQQblVjr cq5wv2ZOXLcZwFqTClfiNirX+cLGfcy0u0QJYGo5hgr4zpN28Ub2pbB6B3S6Ibz0Hk2k gKew== X-Gm-Message-State: AOPr4FW+eqHTxbctVkzN7VX4Gqiia+GgGDHcZZYg1d9waQaQqBlYvHcKKcVXgZD4RTbQtWUjxhee8afVAkhn1w== MIME-Version: 1.0 X-Received: by 10.176.0.239 with SMTP id 102mr2777617uaj.33.1462314824183; Tue, 03 May 2016 15:33:44 -0700 (PDT) Received: by 10.176.69.231 with HTTP; Tue, 3 May 2016 15:33:44 -0700 (PDT) X-Originating-IP: [78.147.12.242] Date: Tue, 3 May 2016 23:33:44 +0100 Message-ID: To: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: ImageMagick vulnerability From: danack@basereality.com (Dan Ackroyd) Hello, 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. 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/ImageMagick= =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. cheers Dan Ack * https://twitter.com/MrDanack/status/727623821860216832