CVE-2022-42889

Apache Commons Text prior to 1.10.0 allows RCE when applied to untrusted input due to insecure interpolation defaults

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.

Remediation

Workaround:

  • Upgrade to Apache Commons Text 1.10.0.

Category

9.8
CVSS
Severity: Critical
CVSS 3.1 •
EPSS 94.16% Top 5%
Vendor Advisory gentoo.org Vendor Advisory apache.org
Affected: Apache Software Foundation Apache Commons Text
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2022-42889?
CVE-2022-42889 has been scored as a critical severity vulnerability.
How to fix CVE-2022-42889?
As a workaround for remediating CVE-2022-42889: Upgrade to Apache Commons Text 1.10.0.
Is CVE-2022-42889 being actively exploited in the wild?
It is possible that CVE-2022-42889 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~94% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2022-42889?
CVE-2022-42889 affects Apache Software Foundation Apache Commons Text.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.