CVE-2022-42889

CRITICAL EXPLOITED IN THE WILD NUCLEI LAB

Apache Commons Text 1.5-1.9 - Remote Code Execution via String Interpolation

Title source: llm
STIX 2.1

Exploitation Summary

CVE-2022-42889 has been observed exploited in the wild (reported by VulnCheck KEV, InTheWild.io). EIP tracks 60 public exploits from researchers including Arjun Chaudhary, karthikuj, kljunowsky, including a Metasploit module exploits/multi/http/apache_commons_text4shell. A Nuclei detection template is also available.

AI-analyzed exploit summary This exploit demonstrates a POST-based RCE vulnerability in Apache Commons Text versions prior to 1.10.0 by leveraging script interpolation to execute a reverse shell payload. The payload uses JavaScript to spawn a bash reverse shell to a specified callback IP and port.

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.

Exploits (60)

exploitdb WORKING POC
by Arjun Chaudhary · pythonwebappsmultiple
https://www.exploit-db.com/exploits/52261

This exploit demonstrates a POST-based RCE vulnerability in Apache Commons Text versions prior to 1.10.0 by leveraging script interpolation to execute a reverse shell payload. The payload uses JavaScript to spawn a bash reverse shell to a specified callback IP and port.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text < 1.10.0
No auth needed
Prerequisites: Target application using vulnerable Apache Commons Text version · Network access to the target · Callback listener set up on attacker's machine
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 76 stars
by karthikuj · remote
https://github.com/karthikuj/cve-2022-42889-text4shell-docker

This repository contains a functional PoC for CVE-2022-42889 (Text4Shell), demonstrating RCE via Apache Commons Text string interpolation. The exploit leverages the vulnerable `StringSubstitutor` class to execute arbitrary commands.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Docker environment · Maven for building the project · Vulnerable Apache Commons Text library
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 56 stars
by kljunowsky · remote
https://github.com/kljunowsky/CVE-2022-42889-text4shell

This repository contains a proof-of-concept exploit for CVE-2022-42889 (Text4Shell), targeting Apache Commons Text versions 1.5 through 1.9. The exploit leverages the StringSubstitutor interpolator to execute arbitrary commands via script, DNS, or URL lookups.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text 1.5-1.9
No auth needed
Prerequisites: Target application must use vulnerable Apache Commons Text version · Attacker-controlled input must reach the StringSubstitutor interpolator
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 39 stars
by ClickCyber · remote
https://github.com/ClickCyber/cve-2022-42889

This PoC exploits CVE-2022-42889 (Text4Shell) in Apache Commons Text by crafting a malicious payload that triggers remote code execution via script interpolation. The payload uses a reverse shell command to connect back to an attacker-controlled IP and port.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text versions 1.5 through 1.9
No auth needed
Prerequisites: Vulnerable Apache Commons Text version (1.5-1.9) · Network access to the target application
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 34 stars
by SeanWrightSec · remote
https://github.com/SeanWrightSec/CVE-2022-42889-PoC

This PoC demonstrates CVE-2022-42889, an RCE vulnerability in Apache Commons Text due to unsafe interpolation of script, dns, and url lookups. It allows arbitrary JavaScript execution via the StringSubstitutor class.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (1.5.0 to 1.9.0)
No auth needed
Prerequisites: JDK 11+ · Maven · Vulnerable Apache Commons Text version
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 20 stars
by cxzero · remote
https://github.com/cxzero/CVE-2022-42889-text4shell

This repository contains a functional proof-of-concept for CVE-2022-42889 (Text4Shell), demonstrating RCE via Apache Commons Text's StringSubstitutor interpolator. It includes endpoints for testing script, DNS, and URL interpolators, with examples for both Nashorn (JDK < 15) and JEXL (JDK 15+).

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text 1.5-1.9
No auth needed
Prerequisites: Apache Commons Text 1.5-1.9 · Use of StringSubstitutor interpolator · Attacker-controlled input passed to StringSubstitutor.replace() or replaceIn()
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER 20 stars
by f0ng · poc
https://github.com/f0ng/text4shellburpscanner

This repository contains a Burp Suite extension for scanning CVE-2022-42889 (Text4Shell), a vulnerability in Apache Commons Text. The scanner is passive and checks for the vulnerability by sending crafted payloads and monitoring responses.

Classification
Scanner 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Burp Suite · Java runtime environment
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 15 stars
by cryxnet · remote
https://github.com/cryxnet/CVE-2022-42889-RCE

This repository contains a functional Proof of Concept (PoC) for CVE-2022-42889 (Text4Shell), demonstrating remote code execution via Apache Commons Text variable interpolation. The PoC includes payloads for script, URL, and DNS lookups, along with reverse shell capabilities for both Windows and Linux targets.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text versions 1.5 to 1.9
No auth needed
Prerequisites: Python 3.9.x · nmap · ncat · requests library · base64 library · colorama library
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 14 stars
by alealeluyah · poc
https://github.com/alealeluyah/CVE-2022-42889-Text4Shell-POC

The repository contains a functional Python script that tests for CVE-2022-42889 (Text4Shell) by crafting malicious strings for RCE (via JavaScript execution) or SSRF (via URL fetching) and sending them to a target endpoint. The script supports two modes (RCE/SSRF) and encodes payloads before sending HTTP GET requests.

Classification
Working Poc 95%
Attack Type
Rce | Ssrf
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Target application must process user input with vulnerable StringLookupFactory or StringSubstitutor methods · Java version < 15 for RCE (Nashorn engine required)
devstral-2 · analyzed Apr 24, 2026 Full analysis →
nomisec WORKING POC 14 stars
by alebrestado · poc
https://github.com/alebrestado/CVE-2022-42889-Text4Shell-POC

This repository contains a functional Python script that tests for CVE-2022-42889 (Text4Shell) by crafting malicious strings for RCE and SSRF attacks. The script automates the exploitation process by constructing payloads and sending HTTP requests to a target URL.

Classification
Working Poc 95%
Attack Type
Rce | Ssrf
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Target application must process user-controlled input with vulnerable methods (StringLookupFactory.INSTANCE.interpolatorStringLookup().lookup() or StringSubstitutor.createInterpolator().replace())
devstral-2 · analyzed Apr 24, 2026 Full analysis →
nomisec WORKING POC 14 stars
by 808ale · remote
https://github.com/808ale/CVE-2022-42889-Text4Shell-POC

This repository contains a Python script to test for CVE-2022-42889 (Text4Shell), a vulnerability in Apache Commons Text that allows RCE or SSRF via crafted strings. The script supports two modes: RCE (using JavaScript execution) and SSRF (using URL fetching).

Classification
Working Poc 95%
Attack Type
Rce | Ssrf
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Target application must process user-controlled input with vulnerable methods (StringLookupFactory.INSTANCE.interpolatorStringLookup().lookup() or StringSubstitutor.createInterpolator().replace())
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 10 stars
by korteke · remote
https://github.com/korteke/CVE-2022-42889-POC

This repository contains a functional proof-of-concept for CVE-2022-42889, demonstrating RCE via Apache Commons Text's StringSubstitutor. It includes examples for DNS, URL, and script-based exploits, along with a reverse shell payload.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Docker · Java · Maven
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 8 stars
by securekomodo · poc
https://github.com/securekomodo/text4shell-poc

This repository contains a functional Proof of Concept (PoC) for CVE-2022-42889, demonstrating the Text4Shell vulnerability in Apache Commons Text. It includes a Spring Boot application with endpoints to test both reflected and blind exploitation via StringSubstitutor interpolation.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text versions 1.5.0 to 1.9.0
No auth needed
Prerequisites: Apache Commons Text version 1.5.0 to 1.9.0 · Use of StringSubstitutor with interpolation enabled
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WRITEUP 7 stars
by QAInsights · poc
https://github.com/QAInsights/cve-2022-42889-jmeter

This repository provides a script to mitigate CVE-2022-42889 by replacing the vulnerable Apache Commons Text 1.9 with version 1.10.0 in JMeter's lib directory. It includes checksum verification to ensure the integrity of the downloaded file.

Classification
Writeup 100%
Attack Type
Other
Complexity
Trivial
Reliability
Reliable
Target: Apache JMeter 5.5 (with Apache Commons Text 1.9)
No auth needed
Prerequisites: JMeter 5.5 installed with vulnerable Apache Commons Text 1.9 · Bash environment · Internet access to download the patched library
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 6 stars
by ifconfig-me · remote
https://github.com/ifconfig-me/Log4Shell-Payloads

This repository contains a collection of Log4Shell (CVE-2021-45046) payloads for testing and exploiting vulnerable systems. It includes one-liners, WAF bypass techniques, and custom headers for various attack vectors.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Log4j 2.x
No auth needed
Prerequisites: Vulnerable Log4j version · Network access to target
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 6 stars
by akshayithape-devops · remote
https://github.com/akshayithape-devops/CVE-2022-42889-POC

This repository contains a functional Proof of Concept (PoC) for CVE-2022-42889, demonstrating remote code execution via Apache Commons Text's variable interpolation feature. The exploit leverages the 'script' lookup to execute arbitrary commands, as shown in the README and controller code.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text versions 1.5 to 1.9
No auth needed
Prerequisites: Apache Commons Text version 1.5 to 1.9 · Network access to the vulnerable application
devstral-2 · analyzed Feb 16, 2026 Full analysis →
github WORKING POC 5 stars
by JAckLosingHeart · javapoc
https://github.com/JAckLosingHeart/CVE-PoC-Collection/tree/main/commons-text-CVE-2022-42889

This repository contains a functional PoC for CVE-2022-42889 (Text4Shell), demonstrating RCE via Apache Commons Text's StringSubstitutor. The Spring Boot application exposes an endpoint that processes user input with StringSubstitutor, allowing arbitrary code execution through crafted strings.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Apache Commons Text library in classpath · Spring Boot application with exposed endpoint
devstral-2 · analyzed Feb 27, 2026 Full analysis →
nomisec WORKING POC 5 stars
by vickyaryan7 · poc
https://github.com/vickyaryan7/Text4shell-exploit

This is a functional PoC exploit for CVE-2022-42889 (Text4Shell), targeting Apache Commons Text versions 1.5 through 1.9. It leverages string interpolation to execute arbitrary commands via a malicious payload, requiring netcat on the target system to establish a reverse shell.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text 1.5-1.9
No auth needed
Prerequisites: Target must have Apache Commons Text 1.5-1.9 · Target must have netcat installed · Attacker must have a listener set up (e.g., nc -lvnp 4444)
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER 5 stars
by smileostrich · poc
https://github.com/smileostrich/Text4Shell-Scanner

This repository contains a scanner for detecting CVE-2022-42889 (Text4Shell) vulnerability in Apache Commons Text libraries. It scans directories for vulnerable JAR files and reports their paths and versions.

Classification
Scanner 100%
Attack Type
Info Leak
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text versions 1.5 to 1.9
No auth needed
Prerequisites: Access to the filesystem containing the target JAR files
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER 4 stars
by chainguard-dev · poc
https://github.com/chainguard-dev/text4shell-policy

This repository provides a policy-based scanner to detect CVE-2022-42889 (Text4Shell) vulnerabilities in OCI images using Sigstore and Kubernetes enforcement. It includes a Java-based CSV parser for SLSA data but does not contain exploit code.

Classification
Scanner 90%
Attack Type
Other
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text (versions 1.5 to 1.9)
No auth needed
Prerequisites: Access to Kubernetes cluster or OCI image registry · Sigstore/cosign tooling installed
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER 3 stars
by 0xmaximus · poc
https://github.com/0xmaximus/Apache-Commons-Text-CVE-2022-42889

This repository provides a Burp Suite scanner profile for detecting CVE-2022-42889 (Text4Shell), a vulnerability in Apache Commons Text versions 1.5 through 1.9. It includes instructions for integrating the scanner into Burp BountyData.

Classification
Scanner 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text 1.5-1.9
No auth needed
Prerequisites: Burp Suite with BountyData plugin
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 3 stars
by s3l33 · client-side
https://github.com/s3l33/CVE-2022-42889

This is a Python script that exploits CVE-2022-42889 (Text4Shell) by crafting a malicious payload to achieve remote code execution (RCE) via Apache Commons Text. The payload uses a reverse shell generated with netcat and is URL-encoded before being sent to the target.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions 1.5 to 1.9)
No auth needed
Prerequisites: Target application using vulnerable Apache Commons Text version · Network access to the target · Listener set up for reverse shell
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 3 stars
by stavrosgns · remote
https://github.com/stavrosgns/Text4ShellPayloads

This Python script exploits CVE-2022-42889 (Text4Shell) by crafting malicious payloads to achieve remote code execution (RCE) via Apache Commons Text string interpolation. It supports ping, reverse shell, and custom payloads.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions 1.5 to 1.9)
No auth needed
Prerequisites: Vulnerable Apache Commons Text version · Network access to target server
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 3 stars
by uk0 · poc
https://github.com/uk0/cve-2022-42889-intercept

This repository contains a Java agent-based PoC for CVE-2022-42889, which mitigates the vulnerability in Apache Commons Text by intercepting and sanitizing malicious input to the StringSubstitutor class. It supports both premain (startup) and agentmain (runtime) attachment methods.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text (versions affected by CVE-2022-42889)
No auth needed
Prerequisites: Java 8 environment · Access to JVM process (for agentmain attachment)
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 2 stars
by devenes · remote
https://github.com/devenes/text4shell-cve-2022-42889

This repository provides a Docker-based lab for CVE-2022-42889 (Text4Shell), demonstrating RCE via Apache Commons Text string interpolation. The PoC includes a Spring Boot app vulnerable to the exploit and instructions for testing in Docker and Kubernetes environments.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Docker or Kubernetes environment · Network access to the vulnerable application
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 2 stars
by sunnyvale-it · remote
https://github.com/sunnyvale-it/CVE-2022-42889-PoC

This repository contains a functional Proof of Concept (PoC) for CVE-2022-42889 (Text4Shell), demonstrating Remote Code Execution (RCE) via a crafted URL exploiting the Apache Commons Text library vulnerability. The PoC uses a SpringBoot controller to showcase the vulnerability, allowing arbitrary command execution through string interpolation.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text 1.8
No auth needed
Prerequisites: Docker to build and run the vulnerable application · Network access to the target application
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER 2 stars
by Gotcha1G · poc
https://github.com/Gotcha1G/CVE-2022-42889

This YAML file is a Nuclei template designed to detect CVE-2022-42889 (Text4Shell) by sending crafted requests to trigger a DNS interaction via an OGNL injection payload. It does not execute arbitrary commands but confirms vulnerability via DNS callbacks.

Classification
Scanner 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text versions 1.5 to 1.9
No auth needed
Prerequisites: Target application using vulnerable Apache Commons Text version · Outbound DNS connectivity for callback confirmation
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 2 stars
by humbss · poc
https://github.com/humbss/CVE-2022-42889

This repository contains a functional PoC for CVE-2022-42889, exploiting a remote code execution vulnerability in Apache Commons Text versions prior to 1.10. The PoC uses a crafted string with a malicious script expression to trigger a reverse shell via netcat.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text < 1.10
No auth needed
Prerequisites: Network access to the target · Apache Commons Text < 1.10 in the classpath
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by tulhan · poc
https://github.com/tulhan/commons-text-goat

This repository contains a working PoC for CVE-2022-42889, demonstrating RCE via Apache Commons Text's StringSubstitutor with untrusted input. It uses an embedded Jetty server to expose a vulnerable endpoint that processes user-controlled input.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions 1.5 to 1.9)
No auth needed
Prerequisites: Java runtime · Maven for building/running the PoC
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by gokul-ramesh · remote
https://github.com/gokul-ramesh/text4shell-exploit

This is a functional Proof of Concept for CVE-2022-42889 (Text4Shell), exploiting Apache Commons Text to achieve arbitrary command execution via crafted payloads in query parameters or User-Agent headers. It uses an out-of-band (OOB) interaction with Interactsh for validation.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text 1.5.0 to 1.9.0
No auth needed
Prerequisites: Vulnerable Apache Commons Text version · Network access to the target · Interactsh client for OOB validation
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by rhitikwadhvana · remote
https://github.com/rhitikwadhvana/CVE-2022-42889-Text4Shell-Exploit-POC

This is a functional PoC for CVE-2022-42889 (Text4Shell), exploiting a remote code execution vulnerability in Apache Commons Text via malicious string interpolation. It sends a crafted payload to a target URL, triggering a reverse shell connection to the attacker's specified host and port.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text versions 1.5 to 1.9
No auth needed
Prerequisites: Target application using vulnerable Apache Commons Text version · Exposed parameter vulnerable to string interpolation
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WRITEUP
by KosmicOwl045 · poc
https://github.com/KosmicOwl045/ICT287-CVE-2022-42889

This repository provides a detailed technical writeup on CVE-2022-42889 (Text4Shell), including its root cause in the Apache Commons Text library's StringSubstitutor class and exploitation steps. It references an external PoC but does not contain functional exploit code itself.

Classification
Writeup 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text 1.5-1.9
No auth needed
Prerequisites: Docker environment · Java application using vulnerable Apache Commons Text version
devstral-2 · analyzed Apr 10, 2026 Full analysis →
nomisec WRITEUP
by sangrok-jeon · poc
https://github.com/sangrok-jeon/CVE-2022-42889-Analysis

This repository provides a detailed technical analysis of CVE-2022-42889 (Text4Shell), including execution conditions, attack scenarios, and a step-by-step demonstration of exploitation. It covers the vulnerability's root cause, patch analysis, and mitigation strategies.

Classification
Writeup 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text 1.5 to 1.9
No auth needed
Prerequisites: Apache Commons Text 1.5 to 1.9 · User input processed by StringSubstitutor.createInterpolator() and replace()
devstral-2 · analyzed Mar 16, 2026 Full analysis →
nomisec WRITEUP
by engranaabubakar · poc
https://github.com/engranaabubakar/CVE-2022-42889

This repository provides a detailed technical analysis of CVE-2022-42889 (Text4Shell), including vulnerability details, affected versions, exploit features, and mitigation strategies. It does not contain actual exploit code but offers a comprehensive writeup with technical depth.

Classification
Writeup 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text < 1.10.0
No auth needed
Prerequisites: Python 3.6+ · requests library · vulnerable Apache Commons Text version
devstral-2 · analyzed Mar 10, 2026 Full analysis →
gitlab WORKING POC
by ndanhdien98 · remote
https://gitlab.com/ndanhdien98/text4shell-poc

This repository contains a functional Proof of Concept (PoC) for CVE-2022-42889, demonstrating the Text4Shell vulnerability in Apache Commons Text. It includes a Spring Boot application with endpoints that process user input using StringSubstitutor, allowing for remote code execution via crafted payloads.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text versions 1.5.0 to 1.9.0
No auth needed
Prerequisites: Apache Commons Text version 1.5.0 to 1.9.0 · Use of StringSubstitutor with interpolation enabled
devstral-2 · analyzed Feb 23, 2026 Full analysis →
gitlab WORKING POC
by korteke · remote
https://gitlab.com/korteke/CVE-2022-42889-POC

This repository contains a functional exploit PoC for CVE-2022-42889, demonstrating RCE via Apache Commons Text's StringSubstitutor. It includes a Spring Boot application with endpoints to trigger script, DNS, URL, and reverse shell payloads.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Docker or Java/Maven environment · Apache Commons Text library in classpath
devstral-2 · analyzed Feb 23, 2026 Full analysis →
nomisec WORKING POC
by DimaMend · remote
https://github.com/DimaMend/cve-2022-42889-text4shell

This repository contains a functional PoC for CVE-2022-42889 (Text4Shell), demonstrating RCE via Apache Commons Text string interpolation. The exploit leverages the `StringSubstitutor` class to execute arbitrary commands through crafted input.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Docker · Maven · Java runtime
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by Goultarde · remote
https://github.com/Goultarde/CVE-2022-42889-text4shell

This repository contains a Python-based exploit for CVE-2022-42889 (Text4Shell), targeting Apache Commons Text versions < 1.10.0. The exploit crafts a malicious payload to trigger a reverse shell via Java script injection.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text < 1.10.0
No auth needed
Prerequisites: Python 3 · requests library · target with vulnerable Apache Commons Text · network access to target
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by MendDemo-josh · remote
https://github.com/MendDemo-josh/cve-2022-42889-text4shell

This repository contains a functional PoC for CVE-2022-42889 (Text4Shell), demonstrating RCE via Apache Commons Text string interpolation. The exploit leverages the `StringSubstitutor` class to execute arbitrary commands through crafted input.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Docker environment · Maven for building the project · Apache Commons Text vulnerable version
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by ReachabilityOrg · remote
https://github.com/ReachabilityOrg/cve-2022-42889-text4shell-docker

This repository contains a functional PoC for CVE-2022-42889 (Text4Shell), demonstrating RCE via Apache Commons Text string interpolation. The exploit leverages the `StringSubstitutor` class to execute arbitrary commands when processing malicious input.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text versions 1.5 to 1.9
No auth needed
Prerequisites: Docker environment · Maven for building the project · Apache Commons Text vulnerable version
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by shoucheng3 · poc
https://github.com/shoucheng3/asf__commons-text_CVE-2022-42889_1-9

This repository contains a proof-of-concept for CVE-2022-42889, a vulnerability in Apache Commons Text. The exploit leverages the StringSubstitutor class to achieve remote code execution (RCE) via insecure interpolation.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text 1.9
No auth needed
Prerequisites: Target application using vulnerable version of Apache Commons Text · Ability to control input to StringSubstitutor
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by Syndicate27 · poc
https://github.com/Syndicate27/text4shell-exploit

This is a functional Python-based PoC exploit for CVE-2022-42889 (Text4Shell), targeting Apache Commons Text < 1.10.0. It leverages the `StringSubstitutor` class with script interpolation to execute a reverse shell via a crafted HTTP POST request.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text < 1.10.0
No auth needed
Prerequisites: Vulnerable Java application using Apache Commons Text with script interpolation enabled · Network access to the target · Listener set up on attacker's machine
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by joshbnewton31080 · remote
https://github.com/joshbnewton31080/cve-2022-42889-text4shell

This repository contains a functional PoC for CVE-2022-42889 (Text4Shell), demonstrating RCE via Apache Commons Text string interpolation. The exploit leverages the vulnerable `StringSubstitutor` class to execute arbitrary commands through crafted input.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text versions 1.5 to 1.9
No auth needed
Prerequisites: Target application using vulnerable Apache Commons Text version · Network access to the target endpoint
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by aaronm-sysdig · remote
https://github.com/aaronm-sysdig/text4shell-docker

This repository contains a functional PoC for CVE-2022-42889 (Text4Shell), demonstrating RCE via Apache Commons Text string interpolation. The exploit leverages the `${script:javascript:...}` lookup to execute arbitrary commands.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Docker · Maven · Java runtime
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by 34006133 · remote
https://github.com/34006133/CVE-2022-42889

This repository contains a Go-based PoC for CVE-2022-42889 (Text4Shell), demonstrating remote command execution via crafted payloads using the Apache Commons Text library. The main.go file executes arbitrary commands, while possiblepoc.go includes a reverse shell capability.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions 1.5 to 1.9)
No auth needed
Prerequisites: Network access to vulnerable application · Apache Commons Text library with vulnerable interpolation enabled
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by Sic4rio · remote
https://github.com/Sic4rio/CVE-2022-42889

This PoC exploits CVE-2022-42889 (Text4Shell) by injecting a malicious payload into the User-Agent header and URL query parameter to achieve remote code execution via JavaScript execution in Apache Commons Text.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions 1.5 to 1.9)
No auth needed
Prerequisites: Target application using vulnerable Apache Commons Text version · Network access to the target · Listener set up on attacker's machine for reverse shell
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by necroteddy · remote
https://github.com/necroteddy/CVE-2022-42889

This repository contains a functional PoC for CVE-2022-42889, demonstrating RCE via Apache Commons Text string interpolation. It includes a Spring Boot application and a Python script to trigger the vulnerability.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Docker · Java · Maven · vulnerable Apache Commons Text version
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by Dima2021 · remote
https://github.com/Dima2021/cve-2022-42889-text4shell

This repository contains a functional PoC for CVE-2022-42889 (Text4Shell), demonstrating RCE via Apache Commons Text string interpolation. The exploit leverages the `StringSubstitutor` class to execute arbitrary commands when processing user-controlled input.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Vulnerable version of Apache Commons Text in the classpath · Exposed endpoint processing user input
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by hotblac · poc
https://github.com/hotblac/text4shell

This repository demonstrates CVE-2022-42889 (Text4Shell), a remote code execution vulnerability in Apache Commons Text. It includes a Spring Boot application with endpoints that exploit the vulnerability via StringSubstitutor interpolation, showcasing RCE and file read capabilities.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Target application using vulnerable Apache Commons Text version · Network access to the vulnerable endpoint
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by adarshpv9746 · remote
https://github.com/adarshpv9746/Text4shell--Automated-exploit---CVE-2022-42889

This repository contains a functional PoC for CVE-2022-42889 (Text4Shell), demonstrating RCE via Apache Commons Text string interpolation. It includes automated scripts and a vulnerable Spring Boot application for testing.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text versions 1.5 to 1.9
No auth needed
Prerequisites: Docker · Maven · Apache Commons Text vulnerable version
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by galoget · poc
https://github.com/galoget/CVE-2022-42889-Text4Shell-Docker

This repository contains a Dockerized proof-of-concept for CVE-2022-42889 (Text4Shell), demonstrating remote code execution via Apache Commons Text string interpolation. The vulnerable endpoint processes user input with StringSubstitutor, allowing arbitrary command execution.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text (versions before 1.10.0)
No auth needed
Prerequisites: Docker · Java 13 · Maven · Spring Boot
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec STUB
by eunomie · poc
https://github.com/eunomie/cve-2022-42889-check

This repository contains a minimal Java code snippet demonstrating basic usage of Apache Commons Text's TextStringBuilder, but it does not exploit CVE-2022-42889 or any vulnerability. The code lacks exploit logic or malicious intent.

Classification
Stub 90%
Attack Type
Other
Complexity
Trivial
Reliability
Theoretical
Target: Apache Commons Text (version not specified)
No auth needed
Prerequisites: None
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by neerazz · remote
https://github.com/neerazz/CVE-2022-42889

This repository contains a working PoC for CVE-2022-42889, demonstrating RCE via Apache Commons Text's StringSubstitutor with a JavaScript script injection. The exploit leverages the default interpolator to execute arbitrary code.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text 1.9
No auth needed
Prerequisites: Apache Commons Text 1.9 in the classpath
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER
by kiralab · poc
https://github.com/kiralab/text4shell-scan

This repository contains a scanner for detecting CVE-2022-42889 (Text4Shell), an RCE vulnerability in Apache Commons Text. The tool fuzzes HTTP headers, POST data, and JSON parameters with DNS callback payloads to identify vulnerable hosts.

Classification
Scanner 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text (versions affected by CVE-2022-42889)
No auth needed
Prerequisites: Network access to target · DNS callback provider (e.g., interact.sh, Burp Collaborator)
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by rockmelodies · poc
https://github.com/rockmelodies/CVE-2022-42889

This repository contains a functional PoC for CVE-2022-42889, demonstrating RCE via Apache Commons Text 1.9's StringSubstitutor feature. The exploit uses a crafted template string to execute arbitrary commands, creating a file `/tmp/rce_test` as proof of execution.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text 1.9
No auth needed
Prerequisites: Apache Commons Text 1.9 dependency in the target application
devstral-2 · analyzed Feb 16, 2026 Full analysis →
vulncheck_xdb WORKING POC
remote
https://github.com/junius-sec/kr-vulhub

This repository contains a functional exploit PoC for CVE-2022-42889 (Text4Shell), demonstrating remote code execution via Apache Commons Text's StringSubstitutor.createInterpolator(). The Dockerized Spring Boot application exposes an endpoint that processes user input with the vulnerable function, allowing arbitrary code execution.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text 1.5-1.9
No auth needed
Prerequisites: Docker environment · Network access to target
devstral-2 · analyzed Feb 25, 2026 Full analysis →
vulncheck_xdb WORKING POC
remote
https://github.com/joseluisinigo/riskootext4shell

This repository contains a functional exploit for CVE-2022-42889, targeting Apache Commons Text versions 1.5 through 1.9. The exploit leverages the StringSubstitutor feature to execute arbitrary commands via script lookups, leading to remote code execution (RCE).

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text (versions 1.5 to 1.9)
No auth needed
Prerequisites: Target must have Apache Commons Text versions 1.5 to 1.9 · Target must have netcat or similar tool installed · Attacker must have a reachable IP and port for reverse shell
devstral-2 · analyzed Feb 25, 2026 Full analysis →
vulncheck_xdb WORKING POC
remote-auth
https://github.com/pwnb0y/Text4shell-exploit

This is a functional exploit for CVE-2022-42889, leveraging the Apache Commons Text RCE vulnerability by injecting a malicious script expression via a crafted URL parameter. The exploit triggers a reverse shell to the attacker's specified IP and port using netcat.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Apache Commons Text versions 1.5 through 1.9
No auth needed
Prerequisites: Target must have netcat installed · Target must be vulnerable to CVE-2022-42889 · Attacker must have a listener set up on the specified IP and port
devstral-2 · analyzed Feb 25, 2026 Full analysis →
metasploit WORKING POC EXCELLENT
by Alvaro Muñoz, Karthik UJ, Gaurav Jain · rubypocjava
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/apache_commons_text4shell.rb

This Metasploit module exploits CVE-2022-42889 (Text4Shell) in Apache Commons Text by leveraging the StringSubstitutor interpolator's flawed default behavior, allowing arbitrary code execution via the 'script' lookup key. It supports multiple payload types including Java in-memory execution, command execution, and droppers for Windows/Linux.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Apache Commons Text 1.5 to 1.9
No auth needed
Prerequisites: Target must use StringSubstitutor interpolator · Target must run JDK < 15 · Vulnerable parameter must be identified
devstral-2 · analyzed Feb 16, 2026 Full analysis →

Nuclei Templates (1)

Text4Shell - Remote Code Execution
CRITICALby mordavid,princechaddha

Scores

CVSS v3 9.8
EPSS 0.9425
EPSS Percentile 99.9%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation none
Automatable yes
Technical Impact total

Lab Environment

COMMUNITY
Community Lab
docker pull cgr.dev/chainguard/jdk@sha256:d8f435ffab139985ab2d505031c8507fc25eedbae0f91bc71edc1914029263da
docker pull eclipse-temurin:18
+54 more repos

Details

VulnCheck KEV 2023-01-12
InTheWild.io 2023-01-12
CWE
CWE-94
Status published
Products (6)
apache/commons_text 1.5 - 1.10.0
com.guicedee.services/commons-text 0Maven
juniper/security_threat_response_manager 7.5.0 (4 CPE variants)
juniper/security_threat_response_manager < 7.5.0
netapp/bluexp
org.apache.commons/commons-text 1.5 - 1.10.0Maven
Published Oct 13, 2022
Tracked Since Feb 18, 2026