Shell Injection Vulnerability in Apache Maven maven-shared-utils

maven-shared-utils Updated 02 Oct 2025

Summary

23/05/2022
N/A
Yes i
Critical
9.8

CVE-2022-29599: 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. Affects maven-shared-utils across 2 version ranges.

< 3.3.0-1+deb11u1 < cc010396156386d95e2acbc28f7aba32590243a2

Fixed in 3.3.0-1+deb11u1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Apache Maven maven-shared-utils is a library that provides shared utilities for Maven projects. It is widely used in the Java ecosystem for building and managing projects. The library includes various functionalities, such as command-line handling, which is crucial for executing Maven commands. However, prior to version 3.3.3, the Commandline class within this library had a significant vulnerability that could lead to shell injection attacks, compromising the security of applications using this library.

Vulnerability Detail

The vulnerability, identified as CVE-2022-29599, arises from the Commandline class's failure to properly escape double-quoted strings. This oversight allows attackers to inject malicious shell commands when the application processes user input. The ramifications of this vulnerability can be severe, potentially leading to unauthorized command execution, data breaches, or system compromise. The issue affects multiple versions of the maven-shared-utils library, making it critical for users to address it promptly.

How To Fix

Minimum fixed version

3.3.0-1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade maven-shared-utils

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading is not immediately possible, consider sanitizing user inputs to prevent shell command execution. This can be done by validating and escaping inputs before they are processed by the Commandline class. Additionally, avoid using double quotes in user inputs where possible.

Conclusion

The CVE-2022-29599 vulnerability in Apache Maven maven-shared-utils poses a serious risk due to its potential for shell injection attacks. Users are strongly advised to upgrade to the latest versions of the library to mitigate this risk. Regular monitoring and vulnerability management practices, such as using tools like Vulert, can help maintain the security of your applications.

See every vulnerability recorded for maven-shared-utils →

Share this vulnerability

FAQ

CVE-2022-29599 is a vulnerability in the Apache Maven maven-shared-utils library that allows for shell injection attacks due to improper escaping of double-quoted strings.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Simply upload your manifest file like package-lock.json to check for vulnerabilities.

The vulnerability can lead to unauthorized command execution, data breaches, and system compromise, posing a significant risk to applications that rely on the affected library.

Versions prior to 3.3.3 are affected in Debian 11, and versions prior to 3.3.4 are affected in Debian 12 and 13.

The CVSS score for CVE-2022-29599 is 9.8, indicating a critical level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for maven-shared-utils.

How To Fix

Minimum fixed version

3.3.0-1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade maven-shared-utils

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback