CVE-2022-4245: XML Injection Vulnerability in org.codehaus.plexus:plexus-utils
Summary
CVE-2022-4245: codehaus-plexus vulnerable to XML injection. Affects org.codehaus.plexus:plexus-utils versions < 3.0.24. Fixed in 3.0.24. How to fix ↓
Also tracked for
- plexus-utils2 · Debian:11
The same CVE-2022-4245 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
Background
org.codehaus.plexus:plexus-utils is a Maven ecosystem package that provides various utility classes for common tasks in Java development. It is widely used in Maven-based projects for its convenience and functionality. However, a vulnerability has been discovered in the package that allows for XML injection attacks.
Vulnerability Detail
The vulnerability in org.codehaus.plexus:plexus-utils exists in the org.codehaus.plexus.util.xml.XmlWriterUtil#writeComment function. This function fails to properly sanitize comments for a --> sequence, which can be exploited to inject malicious XML code. An attacker could craft a command string that, when interpreted as XML, could lead to XML injection. This could potentially result in unauthorized access, data manipulation, or other malicious activities.
How To Fix
Latest published version: 4.1.0 as of 23 Oct 2026
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
3.0.24
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to apply the fix by upgrading to the patched version of org.codehaus.plexus:plexus-utils.
Conclusion
The XML injection vulnerability in org.codehaus.plexus:plexus-utils can be exploited to inject malicious XML code, potentially leading to unauthorized access or data manipulation. It is crucial to upgrade to version 3.0.24 or later to mitigate this vulnerability. For further assistance, please contact DevNack.com.
See every vulnerability recorded for org.codehaus.plexus:plexus-utils →
FAQ
org.codehaus.plexus:plexus-utils is a utility package in the Maven ecosystem that provides various helper classes for common tasks in Java development.
XML injection is a type of attack where an attacker injects malicious XML code into an application, potentially leading to unauthorized access, data manipulation, or other malicious activities.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities in software using just the pom.xml file.
Yes, a fix is available for this vulnerability. It is recommended to upgrade org.codehaus.plexus:plexus-utils to version 3.0.24 or later.
For further support on vulnerability remediation, you can contact info@devnack.com.
References
Related vulnerabilities
Recent vulnerabilities recorded for org.codehaus.plexus:plexus-utils.