Wednesday, November 20, 2024
HomeCVE/vulnerabilityCritical Vulnerability in Perl Module Installer Let Attackers Intercept Traffic

Critical Vulnerability in Perl Module Installer Let Attackers Intercept Traffic

Published on

A critical vulnerability has been identified in App::cpanminus (cpanm), a widely used tool for downloading and installing Perl modules.

This vulnerability, CVE-2024-45321, exposes users to potential cyber threats. It allows attackers to intercept and manipulate traffic during module installation.

CVE-2024-45321 – Vulnerability Details

App::cpanminus, known for its lightweight and efficient handling of Perl module installations, is configured by default to use HTTP rather than the more secure HTTPS protocol.

- Advertisement - SIEM as a Service

This oversight results in a CWE-494: Download of Code Without Integrity Check weakness, which network attackers can exploit to execute arbitrary code.

The lack of encryption in HTTP communications means that attackers could potentially intercept and alter the transmitted data, posing a severe risk to users relying on cpanminus for module installations.

Mitigations

Currently, there is no official patch available from the developers of cpanminus.

However, users can employ several mitigation strategies to safeguard their systems:

Are You From SOC/DFIR Teams? - Try Advanced Malware and Phishing Analysis With ANY.RUN -14-day free trial

Option 1: Set a HTTPS Mirror

Users can configure cpanminus to use a secure HTTPS mirror. This can be done by using the –from command-line argument:

$ cpanm --from https://www.cpan.org DISTNAME

Alternatively, users can set the PERL_CPANM_OPT environment variable to ensure all installations use HTTPS:

$ export PERL_CPANM_OPT="--from https://www.cpan.org"

It’s important to note that using this option will disable the ability to download older releases from BackPan and development (TRIAL) releases.

Option 2: Patch the cpanm Executable

Patching the cpanm executable is an option for users who need to retain support for BackPan and TRIAL releases.

This can be achieved with the following Perl one-liner:

$ perl -pi -E 's{http://(www\.cpan\.org|backpan\.perl\.org|cpan\.metacpan\.org|fastapi\.metacpan\.org|cpanmetadb\.plackperl\.org)}{https://$1}g' /path/to/cpanm

Option 3: Use an Alternative Client

Users may also consider switching to alternative clients that default to HTTPS, such as CPAN.pm (version 2.35 or later) or App::cpm, which offer secure module installations.

The Perl community and developers actively discuss the issue on platforms like GitHub.

Discussions focus on making cpanminus secure by default and exploring long-term solutions to prevent similar vulnerabilities.

 This vulnerability highlights the critical importance of secure communications in software installations. Users are urged to implement these mitigations promptly to protect their systems from potential threats.

Protect Your Business with Cynet Managed All-in-One Cybersecurity Platform – Try Free Trial

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Latest articles

Rekoobe Backdoor In Open Directories Possibly Attacking TradingView Users

APT31, using the Rekoobe backdoor, has been observed targeting TradingView, a popular financial platform,...

Water Barghest Botnet Comprised 20,000+ IoT Devices By Exploiting Vulnerabilities

Water Barghest, a sophisticated botnet, exploits vulnerabilities in IoT devices to enlist them in...

North Korean IT Worker Using Weaponized Video Conference Apps To Attack Job Seakers

North Korean IT workers, operating under the cluster CL-STA-0237, have been implicated in recent...

Hackers Hijacked Misconfigured Servers For Live Streaming Sports

Recent threat hunting activities focused on analyzing outbound network traffic and binaries within containerized...

Free Webinar

Protect Websites & APIs from Malware Attack

Malware targeting customer-facing websites and API applications poses significant risks, including compliance violations, defacements, and even blacklisting.

Join us for an insightful webinar featuring Vivek Gopalan, VP of Products at Indusface, as he shares effective strategies for safeguarding websites and APIs against malware.

Discussion points

Scan DOM, internal links, and JavaScript libraries for hidden malware.
Detect website defacements in real time.
Protect your brand by monitoring for potential blacklisting.
Prevent malware from infiltrating your server and cloud infrastructure.

More like this

Rekoobe Backdoor In Open Directories Possibly Attacking TradingView Users

APT31, using the Rekoobe backdoor, has been observed targeting TradingView, a popular financial platform,...

Water Barghest Botnet Comprised 20,000+ IoT Devices By Exploiting Vulnerabilities

Water Barghest, a sophisticated botnet, exploits vulnerabilities in IoT devices to enlist them in...

North Korean IT Worker Using Weaponized Video Conference Apps To Attack Job Seakers

North Korean IT workers, operating under the cluster CL-STA-0237, have been implicated in recent...