Exploit database

Vulnerability

CVE-2022-42889

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

Vulnerability details

Score
9.8
Severity
critical

CVSS 3.1 · NVD

Vector string

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

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.

CVE Program

Exploit source choices

37 sources
Apache Commons Text RCE
MSF-multi--http--apache_commons_text4shellMetasploitJava,Linux,Unix,Windows / remote

This exploit takes advantage of the StringSubstitutor interpolator class, which is included in the Commons Text library. A default interpolator allows for string lookups that can lead to Remote Code Execution. This is due to a logic flaw that makes the "script", "dns" and "url" lookup keys interpolated by default, as opposed to what it should be, according to the documentation of the StringLookupFactory class. Those keys allow an attacker to execute arbitrary code via lookups primarily using the "script" key. In order to exploit the vulnerabilities, the following requirements must be met: Run a version of Apache Commons Text from version 1.5 to 1.9 Use the StringSubstitutor interpolator Target should run JDK < 15

2022-10-13apache_commons_text4shell.rb
fullhunt/log4j-scan
GH-cc7da95ea94e11f81b2401cd223abf3cGitHubUnofficial GitHub source

A fully automated, accurate, and extensive scanner for finding log4j RCE CVE-2021-44228

2021-12-1310 files · 3,423 stars
bollwarm/sectoolset
GH-c54d5162b2ca71cdeb00c2f8278f306eGitHubUnofficial GitHub source

The security tool(project) Set from github。github安全项目工具集合

2017-02-0822 files · 1,458 stars
aneasystone/github-trending
GH-57cc0777a8d8d3714cc5a0fca8b6fd16GitHubUnofficial GitHub source

使用 Github Actions 跟踪 Github 趋势项目。

2022-08-0955 files · 213 stars
bit3/jsass
GH-3f0d3a7cd7633db4ecc1ede4a2421203GitHubUnofficial GitHub source

MIRROR Java sass compiler using libsass.

2015-03-27268 files · 94 stars
kljunowsky/cve-2022-42889-text4shell
GH-f8a2c88029f9ab7adc3e67c4c7103cacGitHubUnofficial GitHub source

Apache commons text - CVE-2022-42889 Text4Shell proof of concept exploit.

2022-10-193 files · 56 stars
clickcyber/cve-2022-42889
GH-12836523fb61759bb5b4a747b4048818GitHubUnofficial GitHub source

cve-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.

2022-10-183 files · 40 stars
a0waq4/burptext4shellscan
GH-3b327f68568f1316490857fb639f41daGitHubUnofficial GitHub source

Text4Shell的burp被动扫描插件

2022-12-0732 files · 35 stars
seanwrightsec/cve-2022-42889-poc
GH-67e093fbae73caaefb00774d3b88e72dGitHubUnofficial GitHub source

Proof of Concept for the Apache commons-text vulnerability CVE-2022-42889.

2022-10-176 files · 35 stars
f0ng/text4shellburpscanner
GH-461e5d047a0613f9214dbb2fec123be2GitHubUnofficial GitHub source

text4shell(CVE-2022-42889) BurpSuite Scanner

2022-12-093 files · 20 stars
cryxnet/cve-2022-42889-rce
GH-69c4020badd5203953958ebd214b0811GitHubUnofficial GitHub source

Proof of Concept for CVE-2022-42889 (Text4Shell Vulnerability)

2022-11-044 files · 15 stars
alealeluyah/cve-2022-42889-text4shell-poc
GH-6784c15ac26740f2ad9de34a82096931GitHubUnofficial GitHub source

This 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.

2023-06-272 files · 13 stars
korteke/cve-2022-42889-poc
GH-6807c91410616244ffc1a2d56cd25937GitHubUnofficial GitHub source

A simple application that shows how to exploit the CVE-2022-42889 vulnerability

2022-10-1816 files · 10 stars
securekomodo/text4shell-poc
GH-1b407472da467ee4a0deadfa1b2c31b5GitHubUnofficial GitHub source

Proof of Concept Appliction for testing CVE-2022-42889

2022-10-2014 files · 8 stars
akshayithape-devops/cve-2022-42889-poc
GH-ae8917fbe0afa39be2ce614f8f3a7de3GitHubUnofficial GitHub source

A simple dockerize application that shows how to exploit the CVE-2022-42889 vulnerability.

2022-10-238 files · 5 stars
goultarde/cve-2022-42889-text4shell
GH-7d3856f7ff18beb5d1475e7831333c95GitHubUnofficial GitHub source

Proof of Concept (PoC) for CVE-2022-42889 (Text4Shell) targeting Apache Commons Text versions prior to 1.10.0. This script automates Remote Code Execution (RCE) via script interpolation to establish a reverse shell. This version is a structured optimization based on the original exploit found at Exploit-DB (ID: 52261).

2026-01-022 files · 5 stars
smileostrich/text4shell-scanner
GH-d6f43ef6d9723b04fbe5b886a8906623GitHubUnofficial GitHub source

Vulnerability Scanner for CVE-2022-42889 (Text4Shell)

2022-10-2320 files · 5 stars
vickyaryan7/text4shell-exploit
GH-9789f059e7d2da9138b168160aed71e8GitHubUnofficial GitHub source

Python Script to exploit RCE of CVE-2022-42889

2022-11-213 files · 5 stars
chainguard-dev/text4shell-policy
GH-c562b7758660309a6fce874f752c437fGitHubUnofficial GitHub source

ClusterImagePolicy demo for cve-2022-42889 text4shell

2022-10-1724 files · 4 stars
iamsanjay/cve-2022-42899
GH-bccee2a956c3d880e8444f0c6da8aefaGitHubUnofficial GitHub source

iamsanjay/cve-2022-42899 source repository

2022-10-195 files · 3 stars
s3l33/cve-2022-42889
GH-d4dd652f45136d3589715ac1ef5090bfGitHubUnofficial GitHub source

python script for CVE-2022-42889

2022-10-222 files · 3 stars
stavrosgns/text4shellpayloads
GH-776cbd5e54b401fb0d4705ea15bbc83cGitHubUnofficial GitHub source

This project includes a python script which generates malicious commands leveraging CVE-2022-42889 vulnerability

2022-10-213 files · 3 stars
uk0/cve-2022-42889-intercept
GH-04b9145880c7b501a7d3948e97d94202GitHubUnofficial GitHub source

通过 jvm 启动参数 以及 jps pid进行拦截非法参数

2022-10-2035 files · 3 stars
sunnyvale-it/cve-2022-42889-poc
GH-0cd637e505db55a44974238f5dc0ef65GitHubUnofficial GitHub source

CVE-2022-42889 (a.k.a. Text4Shell) RCE Proof of Concept

2022-11-057 files · 2 stars
afrouper/mavendependencycve-scanner
GH-644ef61166d7769bf9317dbb6d5b99c3GitHubUnofficial GitHub source

A simple and fast Maven dependency vulnerability scanner. Check existence of vuln JARs (transitive)

2021-12-2343 files · 1 stars
gokul-ramesh/text4shell-exploit
GH-f9e75b7bdeace23f428974b9a3e1e0a5GitHubUnofficial GitHub source

CVE-2022-42889 - Text4Shell exploit

2022-12-073 files · 1 stars
syndicate27/text4shell-exploit
GH-e71977eb663e385db9446a72d9d16e7cGitHubUnofficial GitHub source

A custom Python-based proof-of-concept (PoC) exploit targeting Text4Shell (CVE-2022-42889), a critical remote code execution vulnerability in Apache Commons Text versions < 1.10.

2025-03-243 files · 1 stars
tulhan/commons-text-goat
GH-1fa98c5d1b5c589c0c1af3d1c401fc83GitHubUnofficial GitHub source

An intentionally vulnerable webapp to get your hands dirty with CVE-2022-42889.

2022-10-187 files · 1 stars
34006133/cve-2022-42889
GH-494d9b5e28ef4f7e25984c6687ddd2d6GitHubUnofficial GitHub source

RCE PoC for Apache Commons Text vuln

2023-09-096 files · 0 stars
aaronm-sysdig/text4shell-docker
GH-6f1d9dee30428d50ff532fcca490b74dGitHubUnofficial GitHub source

Dockerized POC for CVE-2022-42889 Text4Shell

2023-05-2212 files · 0 stars
adikelty/commons-text-cve-2022-42889
GH-2f045fb72eb7d3bc8825fdfb84e549aeGitHubUnofficial GitHub source

Security backport of Apache Commons Text 1.9 — CVE-2022-42889 (Text4Shell) fix from upstream 1.10.0

2026-11-19227 files · 0 stars