patchminder
Weaponized · Metasploit Text4Shell CVE-2022-42889

Remote code executionin the org.apache.commons:commons-text package.

Published 13 Oct 2022 · Updated 20 Nov 2024 · Every fact sourced

JSONCite
Is it exploited?
Not confirmed

Weaponized: a Metasploit exploit is public.

Attack code is public
Severity
Critical 9.8
CVSSA severity score from 0 to 10. 9 and higher is critical. 3.1 · no login needed
Attack likelihood
Very high
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 99.9% chance in 30 days · 4 Dec 2026
Fix
Available
Upgrade to 1.10.0 or later
In plain words

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.

What to do now
  • 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.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
Apache Commons Text
Not confirmed
Not confirmed
CVE record
org.apache.commons:commons-text (Maven)
1.5 to before 1.10.0
1.10.0
GitHub advisory
com.guicedee.services:commons-text (Maven)
1.2.2.1-jre17 and earlier
Not confirmed
GitHub advisory

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 12 Oct 2022
    CVE ID reserved by apache.
  2. 13 Oct 2022
    Published in the CVE List.
  3. 13 Oct 2022
    Metasploit module: Apache Commons Text RCE.
  4. 17 Oct 2022
    First public proof of concept on GitHub.
  5. 20 Nov 2024
    CVE record last updated.
Exploit code

Attack code anyone can find

Exploit maturity: Weaponized (Metasploit). CISA assessment (SSVC): exploitation none.

Metasploit module
1 module
Nuclei scan template
None known
Exploit-DB
1 entry
GitHub proof of concepts
53 repositories
MetasploitApache Commons Text RCErank excellent
Exploit-DBEDB-ID 52261web application exploit for multiple, published 18 Apr 2025
GitHubno warning signs foundkarthikuj/cve-2022-42889-text4shell-docker76 stars · created 18 Oct 2022Dockerized POC for CVE-2022-42889 Text4Shell
GitHubno warning signs foundkljunowsky/CVE-2022-42889-text4shell56 stars · created 19 Oct 2022Apache commons text · CVE-2022-42889 Text4Shell proof of concept exploit.
GitHubno warning signs foundClickCyber/cve-2022-4288940 stars · created 18 Oct 2022cve-2022-42889 Text4Shell CVE-2022-42889 affects Apache Commons Text versions 1.5 through 1.9. It has been patched as of Commons Text version 1.10.
GitHubno warning signs foundSeanWrightSec/CVE-2022-42889-PoC35 stars · created 17 Oct 2022Proof of Concept for the Apache commons-text vulnerability CVE-2022-42889.
GitHubno warning signs foundcxzero/CVE-2022-42889-text4shell20 stars · created 23 Oct 2022CVE-2022-42889 aka Text4Shell research & PoC
GitHubno warning signs foundf0ng/text4shellburpscanner20 stars · created 9 Dec 2022text4shell(CVE-2022-42889) BurpSuite Scanner
GitHubno warning signs foundcryxnet/CVE-2022-42889-RCE15 stars · created 4 Nov 2022Proof of Concept for CVE-2022-42889 (Text4Shell Vulnerability)
GitHubno warning signs foundalealeluyah/CVE-2022-42889-Text4Shell-POC13 stars · created 27 Jun 2023This repository contains a Python script to automate the process of testing for a vulnerability known as Text4Shell, referenced under the CVE id: CVE-2022-42889.
GitHubno warning signs foundkorteke/CVE-2022-42889-POC10 stars · created 18 Oct 2022A simple application that shows how to exploit the CVE-2022-42889 vulnerability
GitHubno warning signs foundsecurekomodo/text4shell-poc8 stars · created 20 Oct 2022Proof of Concept Appliction for testing CVE-2022-42889

Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.

References
Cite this page

Patchminder. CVE-2022-42889: Remote code execution in the org.apache.commons:commons-text package. https://patchminder.com/cve/cve-2022-42889/ (accessed 5 December 2026).