OS Command Injection in composer - CVE-2022-24828

 

OS Command Injection in composer - CVE-2022-24828

Published: April 14, 2022


Vulnerability identifier: #VU62312
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2022-24828
CWE-ID: CWE-78
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary shell commands on the target system.

The vulnerability exists due to improper input validation within the VcsDriver::getFileContent() method when parsing $file or $identifier arguments. A remote attacker can pass specially crafted data to the application and execute arbitrary OS commands on the target system, if the Mercurial or the Git driver are used.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


Affected software

composer
Gentoo Linux
SUSE Manager Server
SUSE Manager Retail Branch Server
SUSE Manager Proxy
Fedora
SUSE Linux Enterprise High Performance Computing
SUSE Linux Enterprise Server for SAP Applications
SUSE Linux Enterprise Module for Web Scripting
SUSE Linux Enterprise Server
openSUSE Leap
Ubuntu
Tenable.sc
composer (Ubuntu package)
composer
php-composer2

How to mitigate CVE-2022-24828

Install updates from vendor's website.

composer - addressed in versions 1.10.26, 2.2.12, 2.3.5
Tenable.sc - update to 5.21.0
composer (Ubuntu package) - addressed in versions 1.0.0~beta2-1ubuntu0.1~esm2, 1.6.3-1ubuntu0.1~esm2, 1.10.1-1ubuntu0.1~esm2, 2.2.6-2ubuntu4+esm1, 2.7.1-2ubuntu0.1~esm1
composer - addressed in versions 1.10.26-1.el7, 2.2.12-1.fc34, 2.3.5-1.el9, 2.3.5-1.fc35, 2.3.5-1.fc36
php-composer2 - update to 2.2.3-150400.3.3.1

External References

Related Security Bulletins