CVE-2022-42889
Java vulnerability analysis and mitigation

Overview

CVE-2022-42889, also known as Text4shell, is a critical vulnerability discovered in Apache Commons Text library versions 1.5 through 1.9. The vulnerability was reported by Alvaro Muñoz and disclosed in October 2022. The issue affects the StringSubstitutor interpolator class, which allows for string lookups that can lead to Remote Code Execution (RCE). The vulnerability received a CVSS score of 9.8 (Critical) (Apache Advisory, Sysdig Blog).

Technical details

The vulnerability exists in the StringSubstitutor interpolator class where a default interpolator allows for string lookups using the format '${prefix:name}'. The problematic interpolators include 'script' (which can execute expressions using the JVM script execution engine), 'dns' (for resolving DNS records), and 'url' (for loading values from URLs, including remote servers). These lookup keys are interpolated by default, contrary to what the documentation of the StringLookupFactory class suggests (Sysdig Blog, OSS Security).

Impact

The vulnerability allows attackers to execute arbitrary code on affected systems when processing malicious input, potentially leading to complete system compromise. While rated as Critical with a CVSS score of 9.8, the actual impact is considered less severe than similar vulnerabilities like Log4Shell due to the limited usage of the StringSubstitutor object with user-controlled input in production environments (Sysdig Blog).

Mitigation and workarounds

The primary mitigation is to upgrade to Apache Commons Text version 1.10.0, which disables the problematic interpolators by default. For systems that cannot be immediately upgraded, there are no documented workarounds (OSS Security, Gentoo Security).

Community reactions

The vulnerability gained significant attention due to its similarity to Log4Shell, though security researchers noted that its real-world impact would likely be less severe due to the more limited use of the vulnerable component. Various organizations and vendors, including NetApp and Red Hat, issued advisories and patches for their affected products (NetApp Security, Red Hat CVE).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-26866HIGH8.8
  • JavaJava
  • org.apache.hugegraph:hg-pd-core
NoYesDec 12, 2025
CVE-2025-54981HIGH7.5
  • JavaJava
  • org.apache.streampark:streampark
NoYesDec 12, 2025
CVE-2025-67721MEDIUM6.3
  • JavaJava
  • io.airlift:aircompressor-v3
NoYesDec 12, 2025
CVE-2025-53960MEDIUM5.9
  • JavaJava
  • org.apache.streampark:streampark
NoYesDec 12, 2025
CVE-2025-54947MEDIUM5.3
  • JavaJava
  • org.apache.streampark:streampark
NoYesDec 12, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management