CVE-2022-33980: Code Injection in Apache Commons Configuration
Summary
CVE-2022-33980: Code injection in Apache Commons Configuration. Affects org.apache.commons:commons-configuration2 versions >= 2.4, < 2.8.0. Fixed in 2.8.0. How to fix ↓
Also tracked for
- commons-configuration2 · Debian:11
The same CVE-2022-33980 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
Apache Commons Configuration is a library that provides a generic configuration interface for Java applications. It allows properties to be dynamically evaluated and expanded through variable interpolation. The interpolation format follows the pattern '${prefix:name}', where 'prefix' is used to locate an instance of org.apache.commons.configuration2.interpol.Lookup that performs the interpolation. However, versions 2.4 to 2.7 of Apache Commons Configuration included default Lookup instances that could result in code execution or contact with remote servers. This vulnerability, with a CVSS score of 9.8, can lead to remote code execution or unintentional communication with remote servers if untrusted configuration values are used.
Vulnerability Detail
The vulnerability in Apache Commons Configuration arises from the inclusion of default Lookup instances that enable arbitrary code execution or contact with remote servers. The affected Lookups are 'script', which executes expressions using the JVM script execution engine, 'dns', which resolves DNS records, and 'url', which loads values from URLs, including remote servers. If an application uses the affected versions and relies on the default interpolation settings, it may be vulnerable to remote code execution or unintentional communication with remote servers when untrusted configuration values are used.
How To Fix
Latest published version: 2.15.1 as of 22 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
2.8.0
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 specific workaround provided for this vulnerability. However, upgrading to Apache Commons Configuration 2.8.0 or later is the recommended solution.
Conclusion
The vulnerability in Apache Commons Configuration allows for code injection and unauthorized communication with remote servers. To mitigate this risk, it is crucial to upgrade to Apache Commons Configuration 2.8.0 or later. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.apache.commons:commons-configuration2 →
FAQ
Apache Commons Configuration is a library that provides a generic configuration interface for Java applications. It allows properties to be dynamically evaluated and expanded through variable interpolation.
Versions 2.4 to 2.7 of Apache Commons Configuration are affected by this vulnerability.
The vulnerability can lead to remote code execution or unintentional communication with remote servers if untrusted configuration values are used.
To fix this vulnerability, it is recommended to upgrade to Apache Commons Configuration 2.8.0 or later, which disables the problematic interpolators by default.
There is no specific workaround provided for this vulnerability. Upgrading to the latest version is the recommended solution.
Related vulnerabilities
Recent vulnerabilities recorded for org.apache.commons:commons-configuration2.