S4E just found a high-severity finding from top 10 tcp port service scan
PlatformPlansPartners
Resources
ToolsBlogDocs
Sign Up →
critical·Product Based Web Vulnerabilities·Updated Oct 8, 2024

CVE-2022-42889 Scanner

Detects 'Remote Code Execution' vulnerability in Apache Commons Text affects v. 1.5.0 through 1.9.

Est. Time~10 seconds
Scan TypeSingle Scan
Targetsdomain, ipv4, subdomain
CostFree
3.2k
Times Used
continuous scan runs
5.5k
Continuously Checked
assets under CS
0
Vulnerabilities Found
confirmed findings
References
CVECVE-2022-42889
9.8
CVSS

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.

Attack Vector
-
Privileges Req.
-
User Interaction
-
Affected
Apache Commons Textby Apache Software Foundation
unspecified
Updated Aug 22, 2026View on NVD →
Detail

Apache Commons Text is a popular library used in Java applications for text manipulation and transformation. It is widely utilized by developers in various industries to enhance application features concerning text processing. The library is integrated into numerous projects to manage string interpolation, formatting, and lookup operations. Its versatility and ease of use make it a common choice for developers seeking a robust solution in text-related functionalities. Despite its strengths, the library has experienced vulnerabilities that may affect applications relying on it. Users are encouraged to stay updated with library versions to avoid potential security issues.

The Remote Code Execution vulnerability in Apache Commons Text allows unauthorized execution of code in the system where the affected version is deployed. This vulnerability arises when the library performs variable interpolation, leading to arbitrary code execution or remote server contact. Specifically, the vulnerability is linked to default lookup instances, such as script, DNS, and URL, used within specific versions of the library. When untrusted configuration values are used, the application becomes susceptible to exploiting this flaw. The result is potentially severe, granting attackers the ability to execute malicious scripts or interact with remote resources inappropriately.

The vulnerable endpoint in this scenario is related to the variable interpolation function that uses "${prefix:name}" format. The function is responsible for replacing placeholders in text with actual values, which if not properly secured, can be manipulated to perform malicious actions. Within the affected versions, the provided default Lookup instances, script, DNS, and URL, can be utilized by attackers to exploit the system. This may occur due to insufficient sanitization of input strings or inappropriate configuration settings, leading to risky operations being conducted by the library. Users employing these deprecated interpolation functions should be vigilant of their application's vulnerability and take necessary steps to patch the issue.

Exploitation of this vulnerability can allow attackers to execute arbitrary code or scripts on the server, gaining control over system operations. It can lead to unauthorized data access, system manipulation, or complete takeover, depending on the attacker's intentions and the system's security posture. Moreover, the ability to contact remote servers without restriction might enable data exfiltration or facilitate spreading malware to other connected systems. The extent of damage can escalate quickly, warranting immediate mitigation actions to protect the affected applications and their environments.

REFERENCES

Solution Advice

The following remediation steps should be considered:

  • Upgrade Apache Commons Text component to version 1.10.0 or later to ensure the problematic interpolators are disabled by default.
  • Review and sanitize input data to prevent misuse of variable interpolation functions.
  • Assess application dependencies to identify and rectify any usage of deprecated or insecure library features.
  • Implement security controls to monitor and restrict unauthorized code execution within the application context.
  • Continuously monitor for security advisories and patches for libraries integrated into the system.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.