{"id":784,"date":"2021-07-23T12:38:06","date_gmt":"2021-07-23T12:38:06","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/cve-2016-3714-imagemagick\/"},"modified":"2021-07-23T12:38:06","modified_gmt":"2021-07-23T12:38:06","slug":"cve-2016-3714-imagemagick","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/cve-2016-3714-imagemagick\/","title":{"rendered":"CVE-2016-3714 ImageMagick"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<p>##<br \/>\nBackground Information<\/p>\n<p>On Tuesday, May 3 2016, ImageMagick announced a vulnerability in all versions of the ImageMagick software. ImageMagick is a software package commonly used by web services to process images.<\/p>\n<h2 id=\"impact\">Impact<\/h2>\n<p>One of the reported vulnerabilities can potentially be exploited for remote code execution (RCE).<br \/>\nReleases<\/p>\n<p>ImageMagick has not released a fix, but plans to publish a new version of ImageMagic with the fixes soon.<\/p>\n<p>cPanel, L.L.C. normally releases all builds at once in order to limit the ability to reverse engineer fixes.\u2002However, this vulnerability is already wildly known and we have seen reports of it\u2019s use. In this instance, we plan to release builds as soon as they become available.<\/p>\n<p>At this time, the following builds are available:<\/p>\n<ul>\n<li>11.56 \u2014 11.56.0.13<\/li>\n<li>11.54 \u2014 11.54.0.23<\/li>\n<li>EDGE \u2014 11.55.9999.193<\/li>\n<li>CURRENT \u2014 11.56.0.13<\/li>\n<li>RELEASE \u2014 11.56.0.13<\/li>\n<li>STABLE \u2014 11.54.0.23<\/li>\n<\/ul>\n<h2 id=\"how-to-determine-if-your-server-is-up-to-date\">How to determine if your server is up to date<\/h2>\n<p>The updated RPMs provided by cPanel will contain a changelog entry with a CVE number. To view this changelog entry run the following command:<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">rpm <span style=\"color:#f92672\">-<\/span><span style=\"color:#e6db74\">q --changelog <\/span>cpanel<span style=\"color:#f92672\">-<\/span>ImageMagick <span style=\"color:#f92672\">|<\/span> grep CVE<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">2016<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">3714<\/span><\/code><\/pre>\n<\/div>\n<p>The output should resemble below: <\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\"><span style=\"color:#f92672\">-<\/span> Apply workaround <span style=\"color:#66d9ef\">for<\/span> CVE<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">2016<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">3714<\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"what-to-do-if-you-are-not-up-to-date\">What to do if you are not up-to-date<\/h2>\n<p>If your server is not running one of the above versions, update immediately.<\/p>\n<p>To upgrade your server, navigate to WHM\u2019s <em>Upgrade to Latest Version<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; cPanel &gt;&gt; Upgrade to Latest Version<\/em>) and click <em>Click to Upgrade<\/em>.<\/p>\n<p>To upgrade cPanel from the command line run the following commands:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">scripts<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">upcp<\/span>\n<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">scripts<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">check_cpanel_rpms<\/span> <span style=\"color:#f92672\">--<\/span><span style=\"color:#a6e22e\">fix<\/span> <span style=\"color:#f92672\">--<\/span><span style=\"color:#a6e22e\">long<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">list<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<p>To verify the new cpanel-ImageMagick RPM was installed run the following command:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">rpm <span style=\"color:#f92672\">-<\/span><span style=\"color:#e6db74\">q --changelog <\/span>cpanel<span style=\"color:#f92672\">-<\/span>ImageMagick <span style=\"color:#f92672\">|<\/span> grep CVE<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">2016<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">3714<\/span><\/code><\/pre>\n<\/div>\n<p>The output should resemble the following:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\"><span style=\"color:#f92672\">-<\/span> Apply workaround <span style=\"color:#66d9ef\">for<\/span> CVE<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">2016<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">3714<\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"manual-mitigation\">Manual mitigation<\/h2>\n<p>We will publish builds for 11.52, and 11.50 as soon as they become available. We will attempt use  WHM\u2019s Autofixer to update the <code>policy.xml<\/code> file. For 11.52, and 11.50, you can manually mitigate this vulnerability with the following instructions.<\/p>\n<ol>\n<li>\n<p>Open the following file: <\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\"><span style=\"color:#e6db74\">\/usr\/<\/span>local<span style=\"color:#e6db74\">\/cpanel\/<\/span><span style=\"color:#ae81ff\">3<\/span>rdparty<span style=\"color:#e6db74\">\/etc\/<\/span>ImageMagick<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">6<\/span><span style=\"color:#f92672\">\/<\/span>policy<span style=\"color:#f92672\">.<\/span>xml<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>Update the file to match the policy example below to disable the EPHEMERAL, URL, HTTPS, MVG, and MSL coders. <\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">3\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">4\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">5\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">6\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">7\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\">&lt;<span style=\"color:#a6e22e\">policymap<\/span>&gt;\n&lt;<span style=\"color:#a6e22e\">policy<\/span> <span style=\"color:#a6e22e\">domain<\/span>=<span style=\"color:#e6db74\">\"coder\"<\/span> <span style=\"color:#a6e22e\">rights<\/span>=<span style=\"color:#e6db74\">\"none\"<\/span> <span style=\"color:#a6e22e\">pattern<\/span>=<span style=\"color:#e6db74\">\"EPHEMERAL\"<\/span> <span style=\"color:#f92672\">\/<\/span>&gt;\n&lt;<span style=\"color:#a6e22e\">policy<\/span> <span style=\"color:#a6e22e\">domain<\/span>=<span style=\"color:#e6db74\">\"coder\"<\/span> <span style=\"color:#a6e22e\">rights<\/span>=<span style=\"color:#e6db74\">\"none\"<\/span> <span style=\"color:#a6e22e\">pattern<\/span>=<span style=\"color:#e6db74\">\"URL\"<\/span> <span style=\"color:#f92672\">\/<\/span>&gt;\n&lt;<span style=\"color:#a6e22e\">policy<\/span> <span style=\"color:#a6e22e\">domain<\/span>=<span style=\"color:#e6db74\">\"coder\"<\/span> <span style=\"color:#a6e22e\">rights<\/span>=<span style=\"color:#e6db74\">\"none\"<\/span> <span style=\"color:#a6e22e\">pattern<\/span>=<span style=\"color:#e6db74\">\"HTTPS\"<\/span> <span style=\"color:#f92672\">\/<\/span>&gt;\n&lt;<span style=\"color:#a6e22e\">policy<\/span> <span style=\"color:#a6e22e\">domain<\/span>=<span style=\"color:#e6db74\">\"coder\"<\/span> <span style=\"color:#a6e22e\">rights<\/span>=<span style=\"color:#e6db74\">\"none\"<\/span> <span style=\"color:#a6e22e\">pattern<\/span>=<span style=\"color:#e6db74\">\"MVG\"<\/span> <span style=\"color:#f92672\">\/<\/span>&gt;\n&lt;<span style=\"color:#a6e22e\">policy<\/span> <span style=\"color:#a6e22e\">domain<\/span>=<span style=\"color:#e6db74\">\"coder\"<\/span> <span style=\"color:#a6e22e\">rights<\/span>=<span style=\"color:#e6db74\">\"none\"<\/span> <span style=\"color:#a6e22e\">pattern<\/span>=<span style=\"color:#e6db74\">\"MSL\"<\/span> <span style=\"color:#f92672\">\/<\/span>&gt;\n&lt;<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">policymap<\/span>&gt;<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<\/ol>\n<h2 id=\"how-to-mitigate-the-vulnerability-for-other-imagemagick-installations\">How to mitigate the vulnerability for other ImageMagick installations<\/h2>\n<p>If you have a local installation of ImageMagick, we recommend that you use a policy file to disable the vulnerable ImageMagick coders. The global policy for ImageMagick is usually found in the <code>\/etc\/ImageMagick\/policy.xml<\/code> file. The following <code>policy.xml<\/code> example disables the coders EPHEMERAL, URL, HTTPS, MVG, and MSL:<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">3\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">4\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">5\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">6\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">7\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\">&lt;<span style=\"color:#a6e22e\">policymap<\/span>&gt;\n&lt;<span style=\"color:#a6e22e\">policy<\/span> <span style=\"color:#a6e22e\">domain<\/span>=<span style=\"color:#e6db74\">\"coder\"<\/span> <span style=\"color:#a6e22e\">rights<\/span>=<span style=\"color:#e6db74\">\"none\"<\/span> <span style=\"color:#a6e22e\">pattern<\/span>=<span style=\"color:#e6db74\">\"EPHEMERAL\"<\/span> <span style=\"color:#f92672\">\/<\/span>&gt;\n&lt;<span style=\"color:#a6e22e\">policy<\/span> <span style=\"color:#a6e22e\">domain<\/span>=<span style=\"color:#e6db74\">\"coder\"<\/span> <span style=\"color:#a6e22e\">rights<\/span>=<span style=\"color:#e6db74\">\"none\"<\/span> <span style=\"color:#a6e22e\">pattern<\/span>=<span style=\"color:#e6db74\">\"URL\"<\/span> <span style=\"color:#f92672\">\/<\/span>&gt;\n&lt;<span style=\"color:#a6e22e\">policy<\/span> <span style=\"color:#a6e22e\">domain<\/span>=<span style=\"color:#e6db74\">\"coder\"<\/span> <span style=\"color:#a6e22e\">rights<\/span>=<span style=\"color:#e6db74\">\"none\"<\/span> <span style=\"color:#a6e22e\">pattern<\/span>=<span style=\"color:#e6db74\">\"HTTPS\"<\/span> <span style=\"color:#f92672\">\/<\/span>&gt;\n&lt;<span style=\"color:#a6e22e\">policy<\/span> <span style=\"color:#a6e22e\">domain<\/span>=<span style=\"color:#e6db74\">\"coder\"<\/span> <span style=\"color:#a6e22e\">rights<\/span>=<span style=\"color:#e6db74\">\"none\"<\/span> <span style=\"color:#a6e22e\">pattern<\/span>=<span style=\"color:#e6db74\">\"MVG\"<\/span> <span style=\"color:#f92672\">\/<\/span>&gt;\n&lt;<span style=\"color:#a6e22e\">policy<\/span> <span style=\"color:#a6e22e\">domain<\/span>=<span style=\"color:#e6db74\">\"coder\"<\/span> <span style=\"color:#a6e22e\">rights<\/span>=<span style=\"color:#e6db74\">\"none\"<\/span> <span style=\"color:#a6e22e\">pattern<\/span>=<span style=\"color:#e6db74\">\"MSL\"<\/span> <span style=\"color:#f92672\">\/<\/span>&gt;\n&lt;<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">policymap<\/span>&gt;<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<p>If you are still experiencing issues or need additional help, contact cPanel support.<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>## Background Information On Tuesday, May 3 2016, ImageMagick announced a vulnerability in all versions of the ImageMagick software. ImageMagick is a software package commonly used by web services to process images. Impact One of the reported vulnerabilities can potentially be exploited for remote code execution (RCE). Releases ImageMagick has not released a fix, but &hellip;<\/p>\n","protected":false},"author":1,"featured_media":785,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/784"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=784"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/784\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/785"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}