A flaw was reported [1] in perl Digest module's "Digest->new()" function, which did not properly sanitize input before using it in an eval() call, which could possibly be exploited to inject and execute arbitrary perl code. The flaw is fixed in version 1.17 [2] and affects at least as far back as perl 5.8.5. The following patch will correct the flaw (selectively taken from upstream's 1.16->1.17 differences): --- Digest.pm.org 2011-10-03 09:10:29.019681252 -0600 +++ Digest.pm 2011-10-03 09:11:18.630250656 -0600 @@ -35,7 +35,9 @@ sub new ($class, @args) = @$class if ref($class); no strict 'refs'; unless (exists ${"$class\::"}{"VERSION"}) { - eval "require $class"; + my $pm_file = $class . ".pm"; + $pm_file =~ s{::}{/}g; + eval { require $pm_file }; if ($@) { $err ||= $@; next; [1] https://secunia.com/advisories/46279/ [2] http://cpansearch.perl.org/src/GAAS/Digest-1.17/Changes
If we go with AC:H, then CVSSv2 drops to 5.1 (and moderate impact).
Created perl tracking bugs for this issue Affects: fedora-all [bug 743058]
To successfully exploit this vulnerability, the attacker must already be able to execute Perl code or be able to set the algorithm name to be used by the constructor in the form "$ctx = Digest->new(XXX => $arg,...)", which is very unlikely to happen. For additional information, refer to: http://perldoc.perl.org/Digest.html
The code in comment #3 assumes attacker can insert his own Digest::XXX module into Perl search path which itself is more serious problem. Original test case in CPAN RT (https://rt.cpan.org/Public/Bug/Display.html?id=71390#txn-983600) does not need such privilege.
This can be triggered when deserializing specially-crafted input using Data::Serializer. Not sure if that actually makes any real difference. In several serialization frameworks, it is assumed you should not deserialize any untrusted input, as that can lead to code execution. Data::Serializer documentation does not seem to mention that in any way.
Created attachment 526246 [details] Fix for Perl 5.14.2
perl-5.12.4-162.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
perl-5.14.1-188.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
perl-5.12.4-147.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
This issue has been addressed in following products: Red Hat Enterprise Linux 6 Via RHSA-2011:1424 https://rhn.redhat.com/errata/RHSA-2011-1424.html
This issue has been addressed in following products: Red Hat Enterprise Linux 4 Red Hat Enterprise Linux 5 Via RHSA-2011:1797 https://rhn.redhat.com/errata/RHSA-2011-1797.html