Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
ICT287-CVE-2022-42889 — Setup and exploit recreation for CVE-2022-42889 Text4Shell. | Kitploit
Tools/GitHubGitHub/kosmicowl045/ict287-cve-2022-42889
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationLearning & EducationLabs & Practice
GitHubkosmicowl045/ict287-cve-2022-42889

ICT287-CVE-2022-42889

Setup and exploit recreation for CVE-2022-42889 Text4Shell.

View Repository
445 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

ICT287-CVE-2022-42889

To find full exploit setup and recreation report please find the CVE-2022-42889-Project Vulnerability Exploitation Report file. VM that was used to build and run the exploit isn't included in this repository.

Setup and exploit recreation for CVE-2022-42889 Text4Shell.

CVE-2022-42889, also known as "Text4Shell," was a critical vulnerability in the Apache Commons Text library, which is a library frequently used in Java applications for text processing and delivering additions to the standard Java Development Kit’s (JDK) text handling. Versions of the Apache Common Text library, dating back to 2018, 1.5 to 1.9 of the Apache common text library were reported to be affected. The vulnerability stems from unsafe input handling within the StringSubstitutor class, which enables attackers to exploit string interpolation features of the library. This can result in remote code execution (RCE) when processing maliciously crafted input, posing significant risks to applications relying on this library. Hence, CVE-2022-42889 was considered a critical vulnerability and was given a CVSS 3.x base score of 9.8, due to the severe impact it could have on affected systems, including complete system compromise.

This vulnerability has been compared to the infamous Log4Shell (CVE-2021-44228) and Spring4Shell (CVE-2022-22965) vulnerabilities due to its potential to be exploited in Java based applications. Unlike Log4Shell and Spring4Shell, which were vulnerable in even the most basic use-cases, not all users of the Apache Common Text library would be affected as the library must be used in a certain way to expose the attack surface and make the vulnerability exploitable.

  • This vulnerability was first reported by GitHub Security Lab researcher Alvaro Muñoz on March 9, 2022.
  • Apache addressed the issue by releasing a patched version 1.10.0 on October 13, 2022, which removed the vulnerable interpolators from the default configuration.

Exploitation Description

The exploit demonstration utilizes cyberhack255’s Github proof of concept which provides all the scripts and tools needed to run the exploit. Below is a brief description of how the exploitation will proceed:

  1. Build the docker environment.
  2. Run the exploitable docker container.
  3. Connect to the local host on a web browser.
  4. Create and run malicious payload. The demonstration utilize a Dockerfile that sets up a docker container to run a Java application packaged as a fat JAR file (text4shell-poc.jar). It uses the official OpenJDK 8 runtime image based on Alpine Linux, which provides a minimal and lightweight environment. The file installs bash to enable bash scripting during the demonstration. Port 8080 is exposed to allow external access to the container while running the exploit. This PoC will on crafting a malicious payload that exploits the string substitution mechanism in the Apache Commons Text library. The payload will target the lookup key script by invoking the StringSubstitutor.createInterpolator() method. For this demo, the payload will remotly create a new file inside of the docker.
Download Tool