# CVE-2022-33980: Apache Commons Configuration insecure interpolation defaults


- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 6 Jul 2022
- **Updated:** 3 Aug 2024
- **Also known as:** DEBIAN-CVE-2022-33980, DSA-5290-1, GHSA-xj57-8qj4-c4m6, UBUNTU-CVE-2022-33980, openSUSE-SU-2024:13259-1

## What is CVE-2022-33980?

CVE-2022-33980 is a critical vulnerability in Debian Debian Linux, published on 6 Jul 2022. 

### Official description

Apache Commons Configuration performs variable interpolation, allowing properties to be dynamically evaluated and expanded. The standard format for interpolation is "${prefix:name}", where "prefix" is used to locate an instance of org.apache.commons.configuration2.interpol.Lookup that performs the interpolation. Starting with version 2.4 and continuing through 2.7, the set of default Lookup instances included interpolators that could result in arbitrary code execution or contact with remote servers. These lookups are: - "script" - execute expressions using the JVM script execution engine (javax.script) - "dns" - resolve dns records - "url" - load values from urls, including from remote servers Applications using the interpolation defaults in the affected versions may be vulnerable to remote code execution or unintentional contact with remote servers if untrusted configuration values are used. Users are recommended to upgrade to Apache Commons Configuration 2.8.0, which disables the problematic interpolators by default.

## Which versions are affected by CVE-2022-33980?

2 open source packages ship an affected version, including org.apache.commons:commons-configuration2. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.commons:commons-configuration2` | Maven | From 2.4 | 2.8.0 |
| `org.apache.commons:commons-configuration2` | Maven | From 2.4 | 2.8.0 |
| `apache-commons-configuration2` | openSUSE:Tumbleweed | All versions | 2.9.0-1.1 |

Products: Apache Commons Configuration, Debian Debian Linux, Netapp Snapcenter.

## How do I fix CVE-2022-33980?

Upgrade org.apache.commons:commons-configuration2 to 2.8.0 or later.

## Is CVE-2022-33980 being exploited?

There is no known exploitation of CVE-2022-33980 in the wild and no public exploit code.

Public exploit code:

- CVE-2022-33980 Apache Commons Configuration 远程命令执行漏洞 (github_poc): https://github.com/tangxiaofeng7/CVE-2022-33980-Apache-Commons-Configuration-RCE
- CVE (github_poc): https://github.com/HKirito/CVE-2022-33980
- POC for CVE-2022-33980 (Apache Commons Configuration RCE vulnerability) (github_poc): https://github.com/sammwyy/CVE-2022-33980-POC
- text4shell script for text coomons < =1.10 CVE-2022-33980 (github_poc): https://github.com/joseluisinigo/riskootext4shell
- https://github.com/P0lar1ght/CVE-2022-33980-POC (github_poc): https://github.com/P0lar1ght/CVE-2022-33980-POC

## Other vulnerabilities in Debian Debian Linux

- [CVE-2020-1953](https://insights.sbomify.com/CVE-2020-1953/): Remote code execution in Apache Commons Configuration (critical 10.0)
- [CVE-2024-29131](https://insights.sbomify.com/CVE-2024-29131/): Apache Commons Configuration: StackOverflowError adding property in AbstractListDelimiterHandler.flattenIterator() (high 7.3)
- [CVE-2025-46392](https://insights.sbomify.com/CVE-2025-46392/): Apache Commons Configuration: Uncontrolled Resource Consumption when loading untrusted configurations in 1.x (medium 6.5)
- [CVE-2024-29133](https://insights.sbomify.com/CVE-2024-29133/): Apache Commons Configuration: StackOverflowError calling ListDelimiterHandler.flatten(Object, int) with a cyclical object tree (medium 5.4)
- [CVE-2026-45205](https://insights.sbomify.com/CVE-2026-45205/): Apache Commons Configuration: StackOverflowError for YAML input with cycles (medium 5.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-33980 and fix it if it is affected.

What it is: CVE-2022-33980 is a critical vulnerability in Debian Debian Linux, published on 6 Jul 2022. 
Exploitation: There is no known exploitation of CVE-2022-33980 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.commons:commons-configuration2 (Maven): affected from 2.4; fixed in 2.8.0
- org.apache.commons:commons-configuration2 (Maven): affected from 2.4; fixed in 2.8.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-33980/ (Markdown: https://insights.sbomify.com/CVE-2022-33980/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-33980
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-33980
- OSV: https://osv.dev/vulnerability/CVE-2022-33980

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-33980/
Summaries are generated and may contain mistakes; the official description above is the record.
