Newly Disclosed Vulnerability in Apache Commons Text Allows for RCE (CVE-2022-42889)

Description

UPDATE #1 2022/10/20: Updated protection section with IPS coverage.


FortiGuard Labs is aware of reports of a recent vulnerability in Apache Commons, which allows for remote code execution. Assigned, CVE-2022-42889, Apache Commons Text prior to 1.10.0 allows remote code execution (RCE) when applied to untrusted input due to insecure interpolation defaults.


What are the Details of this Vulnerability?

According to Apache, version 1.5 and 1.9 of Apache Commons are affected. Apache Commons suffers from default Lookup instance where included interpolators 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 defalts in versions 1.5 and 1.9 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 default interpolators.


Have there been Reports of Exploitation in the Wild?

No. There have been no instances reported in the wild according to Apache. This is likely due to unique niche setups and the specific parameters required to successfully exploit this vulnerability.


What is the CVSS Score?

9.8 CRITICAL


There are Reports that this is Similar to Log4Shell, hence the Designation #Text4Shell. Along with the CVSS Score of 9.8 is there Reason for Concern?

Reports of this issue appear to be minimal, with no evidence at this time of active exploitation or wide install base similar to the Log4Shell event. This is due to the niche usage of Apache Commons and specific parameters that must be passed to successfully leverage this vulnerability. A small subset of open source programs have been observed using the parameters but those that are do not accept user defined parameters, which should limit the amount of exploitation attempts.


Any Recommended Mitigation?

It is suggested to upgrade to Apache Commons Text 1.10.0 as soon as time permits. If this is not possible, it is suggested that all internet facing sites running vulnerable versions of Apache Commons Text are put behind a firewall or removed from the public facing internet.


What is the Status of AV/IPS Coverage?

FortiGuard Labs has released the following IPS signature for CVE-2022-42889:

  • Apache.Commons.Text.Interpolation.Remote.Code.Execution (default action is set to "pass")

Telemetry