Apache Patches Text4Shell RCE vulnerability

October 18, 2022

Apache Patches Text4Shell RCE vulnerability

Apache has released an advisory addressing a critical Remote Code Execution (RCE) vulnerability in the Apache Commons Text library.

The vulnerability, dubbed as “Text4Shell”, results from insecure implementation of Commons Text’s variable interpolation functionality—more specifically, some default lookup strings could potentially accept untrusted input from remote attackers, such as DNS requests, URLs, or inline scripts.

The Critical Vulnerability

  • CVE-2022-42889 (CVSS 9.8) – 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.

Affected Products

  • Apache Common Text versions 1.5-1.9

Fixed Products

  • Apache Common Text version 1.10

Mitigation

CYREBRO recommends utilizing the vulnerable library to update it to the latest version 1.10.

References: Apache Advisory

Sign Up for Updates