CVE-2022-29599 Commandline class shell injection vulnerabilities
Attackers can execute arbitrary commands via shell injection in Apache Maven's Commandline class due to improper escaping of double-quoted strings.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-29599?
CVE-2022-29599 is a critical command injection vulnerability in Debian Debian Linux, published on 23 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
In Apache Maven maven-shared-utils prior to version 3.3.3, the Commandline class can emit double-quoted strings without proper escaping, allowing shell injection attacks.
Weakness: CWE-116
Which versions are affected by CVE-2022-29599?
2 open source packages ship an affected version, including org.apache.maven.shared:maven-shared-utils. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.maven.shared:maven-shared-utils Maven | All versions | 3.3.3 |
org.apache.maven.shared:maven-shared-utils Maven | All versions | 3.3.3 |
Linux distribution packages (38)
aopalliance AlmaLinux:8 | All versions | 1.0-17.module_el8.6.0+2752+f1f3449e |
aopalliance AlmaLinux:8 | All versions | 1.0-20.module_el8.6.0+2786+d7c38b21 |
apache-commons-cli AlmaLinux:8 | All versions | 1.4-4.module_el8.6.0+2752+f1f3449e |
apache-commons-cli AlmaLinux:8 | All versions | 1.4-7.module_el8.6.0+2786+d7c38b21 |
apache-commons-codec AlmaLinux:8 | All versions | 1.11-3.module_el8.6.0+2752+f1f3449e |
apache-commons-codec AlmaLinux:8 | All versions | 1.13-3.module_el8.6.0+2786+d7c38b21 |
apache-commons-io AlmaLinux:8 | All versions | 1:2.6-3.module_el8.6.0+2752+f1f3449e |
apache-commons-io AlmaLinux:8 | All versions | 1:2.6-6.module_el8.6.0+2786+d7c38b21 |
apache-commons-lang3 AlmaLinux:8 | All versions | 3.7-3.module_el8.6.0+2752+f1f3449e |
apache-commons-lang3 AlmaLinux:8 | All versions | 3.9-4.module_el8.6.0+2786+d7c38b21 |
apache-commons-logging AlmaLinux:8 | All versions | 1.2-13.module_el8.6.0+2752+f1f3449e |
atinject AlmaLinux:8 | All versions | 1-28.20100611svn86.module_el8.6.0+2752+f1f3449e |
atinject AlmaLinux:8 | All versions | 1-31.20100611svn86.module_el8.6.0+2786+d7c38b21 |
cdi-api AlmaLinux:8 | All versions | 1.2-8.module_el8.6.0+2752+f1f3449e |
cdi-api AlmaLinux:8 | All versions | 2.0.1-3.module_el8.6.0+2786+d7c38b21 |
geronimo-annotation AlmaLinux:8 | All versions | 1.0-23.module_el8.6.0+2752+f1f3449e |
geronimo-annotation AlmaLinux:8 | All versions | 1.0-26.module_el8.6.0+2786+d7c38b21 |
glassfish-el-api AlmaLinux:8 | All versions | 3.0.1-0.7.b08.module_el8.6.0+2752+f1f3449e |
google-guice AlmaLinux:8 | All versions | 4.1-11.module_el8.6.0+2752+f1f3449e |
google-guice AlmaLinux:8 | All versions | 4.2.2-4.module_el8.6.0+2786+d7c38b21 |
guava AlmaLinux:8 | All versions | 28.1-3.module_el8.6.0+2786+d7c38b21 |
guava20 AlmaLinux:8 | All versions | 20.0-8.module_el8.6.0+2752+f1f3449e |
hawtjni-runtime AlmaLinux:8 | All versions | 1.16-2.module_el8.6.0+2752+f1f3449e |
httpcomponents-client AlmaLinux:8 | All versions | 4.5.10-4.module_el8.6.0+2786+d7c38b21 |
httpcomponents-client AlmaLinux:8 | All versions | 4.5.5-5.module_el8.6.0+2752+f1f3449e |
httpcomponents-core AlmaLinux:8 | All versions | 4.4.10-3.module_el8.6.0+2752+f1f3449e |
httpcomponents-core AlmaLinux:8 | All versions | 4.4.12-3.module_el8.6.0+2786+d7c38b21 |
jansi AlmaLinux:8 | All versions | 1.17.1-1.module_el8.0.0+6044+f3cbc35d |
jansi AlmaLinux:8 | All versions | 1.17.1-1.module_el8.6.0+2752+f1f3449e |
jansi AlmaLinux:8 | All versions | 1.18-4.module_el8.6.0+2786+d7c38b21 |
jansi-native AlmaLinux:8 | All versions | 1.7-7.module_el8.6.0+2752+f1f3449e |
jboss-interceptors-1.2-api AlmaLinux:8 | All versions | 1.0.0-8.module_el8.6.0+2752+f1f3449e |
jcl-over-slf4j AlmaLinux:8 | All versions | 1.7.25-4.module_el8.6.0+2752+f1f3449e |
jcl-over-slf4j AlmaLinux:8 | All versions | 1.7.28-3.module_el8.6.0+2786+d7c38b21 |
jsoup AlmaLinux:8 | All versions | 1.11.3-3.module_el8.6.0+2752+f1f3449e |
jsoup AlmaLinux:8 | All versions | 1.12.1-3.module_el8.6.0+2786+d7c38b21 |
jsr-305 AlmaLinux:8 | All versions | 0-0.25.20130910svn.module_el8.6.0+2786+d7c38b21 |
maven AlmaLinux:8 | All versions | 1:3.5.4-5.module_el8.6.0+2752+f1f3449e |
Products include Apache Maven Shared Utils, Debian Debian Linux.
How do I fix CVE-2022-29599?
Upgrade org.apache.maven.shared:maven-shared-utils to 3.3.3 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2022-29599 being exploited?
There is no known exploitation of CVE-2022-29599 in the wild and no public exploit code.
Sources
Also known as ALSA-2022:4797, ALSA-2022:4798, CLSA-2025-1766362094, DEBIAN-CVE-2022-29599, DLA-3059-1, DLA-3086-1 and 16 more.