CVE-2020-16156
High · 7.8CVSS
7.8
EPSS
0.9%
Published
Dec 13, 2021
CISA due date
—
Cloudanix analysis
A flaw in an older version of a popular Perl package tool lets attackers sneak in harmful code that looks legitimate, putting any system that installs Perl modules at risk of being taken over.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Cryptographic Weakness
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Bypasses cryptographic signature verification in CPAN allowing acceptance of unsigned or improperly signed Perl module distributions.
Why it matters to the business
Attackers can deliver and install malicious Perl code on developer and server systems, resulting in supply-chain compromise, data theft, or persistent access with high operational disruption risk.
How an attack unfolds
An attacker prepares a tampered CPAN distribution whose signature validation is skipped due to the weakness; when a user or automated process installs the package the malicious code executes with the privileges of the installing account. Public exploit code exists and the flaw has been known for years.
How to fix it
Upgrade CPAN to a version later than 2.28 that enforces correct signature validation; replace any pinned vulnerable installations; enforce use of verified mirrors and enable strict signature enforcement in cpan configuration.
How to confirm the fix worked
Run cpan --version and confirm it reports a fixed release; test installation of a known signed module with an intentionally invalid signature and verify rejection; review cpan configuration files for signature verification settings.
Typical attack path
- Identify systems or build pipelines that use CPAN 2.28 or affected Perl distributions
- Host or mirror a malicious module package with a forged or absent signature
- Trick the target into running cpan or cpanm against the malicious source
- Signature check is bypassed and the module is installed and executed
- Attacker gains code execution and can persist or pivot
How to detect it
Search package manager logs and shell histories for cpan or cpanm invocations against non-standard URLs; look for recently installed Perl modules whose signature verification was recorded as skipped or failed in verbose cpan output.
- cpan signature verification bypassed
- WARNING: signature verification failed but proceeding
- Installing from http://cpan\.example\.com
What your security team should do
- Immediately inventory all systems using CPAN 2.28 or older and prioritize upgrade
- Block installation from untrusted CPAN mirrors via network controls or proxy rules
- Add CPAN version checks to CI/CD pipelines and developer onboarding
- Monitor for new CPAN releases and subscribe to Perl security announcements
The record
CPAN 2.28 allows Signature Verification Bypass.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | perl-CPAN | 0 | 2.18-402.el8_10 |
| Debian:11 | perl | 0 | No fix |
| Debian:11 | perl | 0 | 5.32.1-4+deb11u4 |
| Debian:12 | perl | 0 | 5.36.0-4 |
| Debian:13 | perl | 0 | 5.36.0-4 |
| Mageia:8 | perl-CPAN | 0 | 2.290.0-1.mga8 |
| Ubuntu:18.04:LTS | perl | 0 | 5.26.1-6ubuntu0.6 |
| Ubuntu:20.04:LTS | perl | 0 | 5.30.0-9ubuntu0.3 |
| Ubuntu:22.04:LTS | perl | 0 | 5.34.0-3ubuntu1.1 |
| Ubuntu:Pro:14.04:LTS | perl | 0 | 5.18.2-2ubuntu1.7+esm4 |
| Ubuntu:Pro:16.04:LTS | perl | 0 | 5.22.1-9ubuntu0.9+esm1 |
Related vulnerabilities
- CVE-2017-12837 Heap-based buffer overflow in the S_regatom function in regcomp.c in Perl 5 before… Also affects perl
- CVE-2015-8853 The (1) S_reghop3, (2) S_reghop4, and (3) S_reghopmaybe3 functions in regexec.c in Perl… Also affects perl
- CVE-2013-7422 Integer underflow in regcomp.c in Perl before 5.20, as used in Apple OS X before 10.10.5… Also affects perl
- CVE-2012-6329 The _compile function in Maketext.pm in the Locale::Maketext implementation in Perl… Also affects perl
- CVE-2011-3597 Eval injection vulnerability in the Digest module before 1.17 for Perl allows… Also affects perl
- CVE-2011-1487 The (1) lc, (2) lcfirst, (3) uc, and (4) ucfirst functions in Perl 5.10.x, 5.11.x, and… Also affects perl
- CVE-2023-47039 A vulnerability was found in Perl. Also affects perl
- CVE-2026-87947 Improper Verification of Cryptographic Signature vulnerability in Drupal SAML SSO… CWE-347