{"id":780,"date":"2021-07-23T12:37:59","date_gmt":"2021-07-23T12:37:59","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/cve-2016-1238-perl\/"},"modified":"2021-07-23T12:37:59","modified_gmt":"2021-07-23T12:37:59","slug":"cve-2016-1238-perl","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/cve-2016-1238-perl\/","title":{"rendered":"CVE-2016-1238 Perl"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"background-information\">Background Information<\/h2>\n<p>On July 25 2016, Perl announced a vulnerability in all versions of the Perl 5 software.<\/p>\n<h2 id=\"impact\">Impact<\/h2>\n<h2 id=\"according-to-perl-development\">According to Perl development:<\/h2>\n<blockquote>\n<p>The problem relates to Perl 5 (\u201cperl\u201d) loading modules from the includes directory array (\u201c@INC\u201d) in which the last element is the current directory (\u201c.\u201d). That means that, when \u201cperl\u201d wants to load a module (during first compilation or during lazy loading of a module in run-time), perl will look for the module in the current directory at the end, since \u2018.\u2019 is the last include directory in its array of include directories to seek. The issue is with requiring libraries that are in \u201c.\u201d but are not otherwise installed.<\/p>\n<\/blockquote>\n<p>Under some conditions, this vulnerability can lead to arbitrary code execution. For example, if you change the current directory to a location to which other users can write.<\/p>\n<h2 id=\"releases\">Releases<\/h2>\n<p>cPanel &#038; WHM version 56 and later are already protected. Versions previous to cPanel &#038; WHM version 56 received updates to mitigate this issue as of TSR-2016-0002 for cPanel-provided scripts. Versions greater than the versions listed below are protected:<\/p>\n<ul>\n<li>11.50 \u2014 11.50.5.0<\/li>\n<li>11.52 \u2014 11.52.4.0<\/li>\n<li>54 \u2014 54.0.18<\/li>\n<\/ul>\n<p>For more information about the protections already in place, read our 56 Release Notes.<\/p>\n<p>Additional updates have been published to protect upstream-provided Perl 5 scripts shipped in the cPanel-provided Perl distribution for versions previous to 56. Versions greater than the versions listed below include the additional protections for upstream-provided scripts:<\/p>\n<ul>\n<li>11.52 \u2014 11.52.6.4<\/li>\n<li>54 \u2014 54.0.27<\/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>For versions 56 and greater, the previously updated RPMs provided by cPanel will contain a changelog entry noting the applied fixes. You can check for the changelog entry in versions 56 and greater with 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>perl<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">522<\/span> <span style=\"color:#f92672\">|<\/span> grep <span style=\"color:#e6db74\">\"Remove . from @INC\"<\/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> Remove <span style=\"color:#f92672\">.<\/span> from @INC <span style=\"color:#66d9ef\">unless<\/span> the environment variable PERL_USE_UNSAFE_INC<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">1<\/span> is set<span style=\"color:#f92672\">.<\/span><\/code><\/pre>\n<\/div>\n<p>For versions 54 and 52, the updated RPMs provided by cPanel will contain a changelog entry with the CVE number. You can check for the changelog entry in versions 54 and 52 with 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>perl<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">514<\/span> <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\">1238<\/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> Fix <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\">1238<\/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: <\/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>For versions 56 and greater, verify the updated Perl RPM was installed:<\/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>perl<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">522<\/span> <span style=\"color:#f92672\">|<\/span> grep <span style=\"color:#e6db74\">\"Remove . from @INC\"<\/span><\/code><\/pre>\n<\/div>\n<p>The output should resemble below:\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> Remove <span style=\"color:#f92672\">.<\/span> from @INC <span style=\"color:#66d9ef\">unless<\/span> the environment variable PERL_USE_UNSAFE_INC<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">1<\/span> is set<span style=\"color:#f92672\">.<\/span><\/code><\/pre>\n<\/div>\n<p>For versions 54 and 52, verify the updated Perl RPM was installed:\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>perl<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">514<\/span> <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\">1238<\/span><\/code><\/pre>\n<\/div>\n<p>The output should resemble below:\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> Fix <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\">1238<\/span><\/code><\/pre>\n<\/div>\n<p>Credit: This issue was discovered and reported by J.D. Lightsey and Todd Rinaldo, courtesy of the cPanel Security Team.<\/p>\n<p>CVE: http:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2016-1238<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Background Information On July 25 2016, Perl announced a vulnerability in all versions of the Perl 5 software. Impact According to Perl development: The problem relates to Perl 5 (\u201cperl\u201d) loading modules from the includes directory array (\u201c@INC\u201d) in which the last element is the current directory (\u201c.\u201d). That means that, when \u201cperl\u201d wants to &hellip;<\/p>\n","protected":false},"author":1,"featured_media":781,"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\/780"}],"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=780"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/780\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/781"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}