Vulnerability · Published Oct 13, 2022 · Assigned by apache
CVE-2022-42889Apache Commons Text prior to 1.10.0 allows RCE when applied to untrusted input due to insecure interpolation defaults
Critical 9.8
In plain English
A critical-severity security flaw in Apache Commons Text from Apache Software Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 99.9% (higher than 99.9% of all known vulnerabilities). Ready-made attack tooling exists: Metasploit, public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
Apache Commons Text 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.text.lookup.StringLookup that performs the interpolation. Starting with version 1.5 and continuing through 1.9, 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 Text 1.10.0, which disables the problematic interpolators by default.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | commons-text | 1.10.0-1 | DEBIAN-CVE-2022-42889 |
| Debian:13 | commons-text | 1.10.0-1 | DEBIAN-CVE-2022-42889 |
| Debian:14 | commons-text | 1.10.0-1 | DEBIAN-CVE-2022-42889 |
| Maven | com.guicedee.services:commons-text | no fix listed | GHSA-599f-7c49-w659 |
| Maven | org.apache.commons:commons-text | 1.10.0 | GHSA-599f-7c49-w659 |
| Ubuntu:22.04:LTS | commons-text | no fix listed | UBUNTU-CVE-2022-42889 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Apache Software Foundation | Apache Commons Text | unspecified – through 1.91.5 – before Apache Commons Text* |
References
- https://lists.apache.org/thread/n2bd4vdsgkqh2tm14l1wyc3jyol7s1om
- [oss-security] 20221013 CVE-2022-42889: Apache Commons Text prior to 1.10.0 allows RCE when applied to untrusted input due to insecure interpolation defaults mailing-list
- [oss-security] 20221017 Re: CVE-2022-42889: Apache Commons Text prior to 1.10.0 allows RCE when applied to untrusted input due to insecure interpolation defaults mailing-list
- https://security.netapp.com/advisory/ntap-20221020-0004/
- https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2022-0022
- GLSA-202301-05 vendor-advisory
- 20230214 OXAS-ADV-2022-0002: OX App Suite Security Advisory mailing-list
- http://packetstormsecurity.com/files/171003/OX-App-Suite-Cross-Site-Scripting-Server-Side-Request-Forgery.html
- http://packetstormsecurity.com/files/176650/Apache-Commons-Text-1.9-Remote-Code-Execution.html