Patchfirst
CVE-2022-42889 Public exploit EPSS 99.9%

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

Apache Software Foundation · Apache Commons Text

Summary

Apache Commons Text, in versions prior to 1.10.0, has insecure default variable interpolation that enables the "script", "dns" and "url" lookups, which can be abused when untrusted input is interpolated.

Official description · CVE.org

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.

Breakdown
63.0 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 3 months after disclosure. Public exploit code (Metasploit) was available the same day.

  1. DisclosedPublic exploit codeMetasploitday 0
  2. First seen exploitedVulnCheck KEV evidence+3 mo

techniques

No techniques linked

No ATT&CK techniques are linked to this CVE yet. MITRE CTID has not mapped it, and no report passage in the corpus ties it to a technique.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

2 packages in 1 ecosystem. Main package: org.apache.commons:commons-text.

Mavenorg.apache.commons:commons-textGHSA-599f-7c49-w659

Upgrade to 1.10.0 or later

Set the version to 1.10.0 or later in your pom.xml or build.gradle.

The first fix for CVE-2022-42889. No other CVE tracked by Patchfirst affects this package.

Affected versions

If you runUpgrade to
1.5 up to 1.10.01.10.0

“Up to” means the second version is the fix and is not affected.

Other packages that bundle this code (1)

Forks, repackagings and products that include the affected code. Each has its own fixed version.

  • Mavencom.guicedee.services:commons-text
    Affected: 1.2.2.1-jre17 and earlierNo fixed version published

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 24 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

9 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close