Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 472428 (CVE-2013-2145) - <dev-perl/Module-Signature-0.720.0: Arbitrary code execution when verifying SIGNATURE (CVE-2013-2145)
Summary: <dev-perl/Module-Signature-0.720.0: Arbitrary code execution when verifying S...
Alias: CVE-2013-2145
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
Whiteboard: B2 [glsa]
Depends on:
Reported: 2013-06-05 16:58 UTC by Agostino Sarubbo
Modified: 2013-10-04 07:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2013-06-05 16:58:17 UTC
From ${URL} :

The perl Module::Signature module adds signing capabilities to CPAN modules.  The 'cpansign verify' command will automatically download keys and use 
them to check the signature of CPAN packages via the SIGNATURE file.

The format of the SIGNATURE file includes the cipher to use to match the provided hash; for instance:

SHA1 955ba924e9cd1bafccb4d6d7bd3be25c3ce8bf75 README

If an attacker were to replace this (SHA1) with a special unknown cipher (e.g. 'Special') and were to include in the distribution a 
'Digest/', the code in this perl module would be executed when 'cpansign -verify' is run.  This will execute arbitrary code with the 
privileges of the user running cpansign.

Because cpansign will download public keys from a public key repository, the GPG key used to sign the SIGNATURE file may also be suspect; an attacker 
able to modify a CPAN module distribution file and sign the SIGNATURE file with their own key only has to make their key public.  cpansign will 
download the attacker's key, validate the SIGNATURE file as being correctly signed, but will then execute code as noted above, if the SIGNATURE file 
is crafted in this way.

Module::Signature version 0.72 corrects [1],[2] this issue by refusing to load Digest::* modules from relative paths in @INC.


@maintainer(s): after the bump, in case we need to stabilize the package, please say explicitly if it is ready for the stabilization or not.
Comment 1 Sergey Popov gentoo-dev 2013-08-20 10:58:31 UTC
+  20 Aug 2013; Sergey Popov <>
+  +Module-Signature-0.730.0.ebuild:
+  Version bump, wrt bug #472428

Arches, please test and mark stable =dev-perl/Module-Signature-0.730.0

Target keywords: amd64 x86
Comment 2 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2013-08-21 11:07:08 UTC
amd64/x86 stable
Comment 3 Sergey Popov gentoo-dev 2013-08-21 11:14:33 UTC
Thanks for your work

New GLSA request filed
Comment 4 GLSAMaker/CVETool Bot gentoo-dev 2013-08-30 10:01:45 UTC
CVE-2013-2145 (
  The cpansign verify functionality in the Module::Signature module before
  0.72 for Perl allows attackers to bypass the signature check and execute
  arbitrary code via a SIGNATURE file with a "special unknown cipher" that
  references an untrusted module in Digest/.
Comment 5 GLSAMaker/CVETool Bot gentoo-dev 2013-10-04 07:21:47 UTC
This issue was resolved and addressed in
 GLSA 201310-01 at
by GLSA coordinator Sergey Popov (pinkbyte).