patchminder

Text4Shell.Remote code execution.

Text4Shell is the nickname of CVE-2022-42889 in the org.apache.commons:commons-text package. 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.

Name used by: Apache, security press

Exploited
Not confirmed
Weaponized: a Metasploit exploit is public
Severity
Critical 9.8
CVSS 3.1 · no login needed
Attack likelihood
Very high
EPSS 99.9% chance in 30 days · 4 Dec 2026
Fix
Available
Upgrade to 1.10.0 or later
Timeline

From publication to today

12 Oct 2022
CVE ID reserved by apache.
13 Oct 2022
Published in the CVE List.
13 Oct 2022
Metasploit module: Apache Commons Text RCE.
17 Oct 2022
First public proof of concept on GitHub.
20 Nov 2024
CVE record last updated.
What to do

Fix it

  • Upgrade org.apache.commons:commons-text (Maven) to 1.10.0 or later.
  • Can't upgrade today? Upgrade to Apache Commons Text 1.10.0.
Affected products

Affected and fixed versions

Product and line
Affected
Fixed in
Apache Commons Text
Not confirmed
Not confirmed
org.apache.commons:commons-text (Maven)
1.5 to before 1.10.0
1.10.0
com.guicedee.services:commons-text (Maven)
1.2.2.1-jre17 and earlier
Not confirmed
Everything else

The full page for CVE-2022-42889

Severity details, every source, exploit references with their warnings, and the version check.

Open CVE-2022-42889All named vulnerabilities