cve.bz

CVE-2022-42889 (Act4Shell) Code Injection

9.8 criticalExploitEPSS >99.9%Fix available

Known as Act4Shell, Text4Shell

Critical (9.8). EPSS >99.9% estimated probability of exploitation activity in the next 30 days. Fixed in org.apache.commons:commons-text 1.10.0.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
>99.9% (unchanged from >99.9% a week ago; >99.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: total, assessed 2024-01-24. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-42889 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-42889?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-42889?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-42889 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Apache Software Foundation Apache Commons Textthrough 1.9
Apache Software Foundation Apache Commons Textfrom 1.5 before Apache Commons Text*

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-599f-7c49-w659Mavenorg.apache.commons:commons-text>=1.5 <1.10.01.10.0
GHSA-599f-7c49-w659Mavencom.guicedee.services:commons-text<=1.2.2.1-jre17no fix published

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14commons-text1.10.0-1DEBIAN-CVE-2022-42889
Ubuntu20.04:LTS, 22.04:LTScommons-textno fix listedUBUNTU-CVE-2022-42889
Red Hatjboss_enterprise_application_platform_eus:7.1::el7eap7-apache-cxf, eap7-apache-cxf-rt, eap7-apache-cxf-tools and 1 more0:3.1.16-4.redhat_00003.1.ep7.el7RHSA-2025:1746
Red Hatjboss_enterprise_application_platform_eus:7.1::el7eap7-jackson-databind0:2.8.11.6-2.SP1_redhat_00002.1.ep7.el7RHSA-2025:1746
Red Hatjboss_enterprise_application_platform_eus:7.1::el7eap7-jettison0:1.3.8-2.redhat_00002.1.ep7.el7RHSA-2025:1746
Red Hatjboss_enterprise_application_platform_eus:7.1::el7eap7-netty, eap7-netty-all0:4.1.63-1.Final_redhat_00002.1.ep7.el7RHSA-2025:1746
Red Hatjboss_enterprise_application_platform_eus:7.1::el7eap7-resteasy, eap7-resteasy-cdi, eap7-resteasy-jaxrs and 14 more0:3.0.27-1.Final_redhat_00001.1.ep7.el7RHSA-2025:1746
Red Hatjboss_enterprise_application_platform_eus:7.1::el7eap7-snakeyaml0:1.33.0-1.SP1_redhat_00001.1.ep7.el7RHSA-2025:1746
Red Hatjboss_enterprise_application_platform_eus:7.1::el7eap7-velocity0:1.7.0-3.redhat_00006.1.ep7.el7RHSA-2025:1746
Red Hatjboss_enterprise_application_platform_eus:7.1::el7eap7-wildfly, eap7-wildfly-modules0:7.1.9-2.GA_redhat_00002.1.ep7.el7RHSA-2025:1746
Red Hatjboss_enterprise_application_platform_eus:7.3::el7eap7-hal-console0:3.2.17-1.Final_redhat_00001.1.el7eapRHSA-2025:1747
Red Hatjboss_enterprise_application_platform_eus:7.3::el7eap7-jackson-core, eap7-jackson-jaxrs-base, eap7-jackson-annotations and 5 more0:2.10.4-2.redhat_00004.1.el7eapRHSA-2025:1747
Red Hatjboss_enterprise_application_platform_eus:7.3::el7eap7-jackson-databind, eap7-jackson-modules-base, eap7-jackson-module-jaxb-annotations0:2.10.4-4.redhat_00004.1.el7eapRHSA-2025:1747
Red Hatjboss_enterprise_application_platform_eus:7.3::el7eap7-jettison0:1.5.2-2.redhat_00002.1.el7eapRHSA-2025:1747
249 more for Red Hat in the JSON and on Red Hat's page.
openSUSETumbleweedapache-commons-text1.10.0-1.1openSUSE-SU-2024:12409-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · openSUSE.

Red Hat

Red Hat rates this Critical.

Red Hat's statement

In order to carry successful exploitation of this vulnerability, the following conditions must be in place on the affected target:

- Usage of specific methods that interpolate the variables as described in the flaw

- Usage of external input for those methods

- Usage of that external input has to be unsanitized/no "allow list"/etc.

The following products have *Low* impact because they have maven references to the affected package but do not ship it nor use the code:

- Red Hat EAP Expansion Pack (EAP-XP)

- Red Hat Camel-K

- Red Hat Camel-Quarkus

Red Hat Satellite ships Candlepin that embeds Apache Commons Text, however, it is not vulnerable to the flaw since the library has not been exposed in the product code. In Candlepin, the Commons Text is being pulled for the Liquibase and ActiveMQ Artemis libraries as a dependency. Red Hat Product Security has evaluated and rated the impact of the flaw as Low for Satellite since there was no harm identified to the confidentiality, integrity, or availability of systems.

- The OCP has a *Moderate* impact because the affected library is a third-party library in the OCP jenkins-2-plugin component which reduces the possibilities of successful exploitation.

- The OCP-4.8 is affected by this CVE and is in an extended life phase. For versions of products in the Extended Life Phase, Red Hat will provide limited ongoing technical support. No bug fixes, security fixes, hardware enablement or root-cause analysis will be available during this phase, and support will be provided on existing installations only.

Red Hat's mitigation

This flaw may be avoided by ensuring that any external inputs used with the Commons-Text lookup methods are sanitized properly. Untrusted input should always be thoroughly sanitized before using in any potentially risky situations.

ProductPackageStateAdvisory
OCP-Tools-4.12-RHEL-8jenkins-2-plugins-0:4.12.1683009955-1.el8Fixed 2023-05-18RHSA-2023:3195
OCP-Tools-4.12-RHEL-8jenkins-2-plugins-0:4.12.1698294000-1.el8Fixed 2023-10-30RHSA-2023:6172
OCP-Tools-4.12-RHEL-8jenkins-2-plugins-0:4.12.1706515741-1.el8Fixed 2024-02-12RHSA-2024:0778
OCP-Tools-4.13-RHEL-8jenkins-2-plugins-0:4.13.1684911916-1.el8Fixed 2023-05-24RHSA-2023:3299
OCP-Tools-4.13-RHEL-8jenkins-2-plugins-0:4.13.1698292274-1.el8Fixed 2023-10-30RHSA-2023:6179
OCP-Tools-4.13-RHEL-8jenkins-2-plugins-0:4.13.1706516346-1.el8Fixed 2024-02-12RHSA-2024:0776
OCP-Tools-4.14-RHEL-8jenkins-2-plugins-0:4.14.1699356715-1.el8Fixed 2023-11-16RHSA-2023:7288
OCP-Tools-4.14-RHEL-8jenkins-2-plugins-0:4.14.1706516441-1.el8Fixed 2024-02-12RHSA-2024:0777
OpenShift Developer Tools and Services for OCP 4.11jenkins-2-plugins-0:4.11.1683009941-1.el8Fixed 2023-05-17RHSA-2023:3198
OpenShift Developer Tools and Services for OCP 4.11jenkins-2-plugins-0:4.11.1698299029-1.el8Fixed 2023-10-30RHSA-2023:6171
A-MQ Clients 2commons-textNot affected
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch6-rhel8Not affected
Red Hat A-MQ Onlinecommons-textNot affected
Red Hat build of Apicurio Registry 2commons-textNot affected
Red Hat build of Debezium 1commons-textNot affected
Red Hat Data Grid 8commons-textNot affected
Red Hat Integration Camel K 1commons-textAffected
Red Hat JBoss Data Grid 7commons-textNot affected
Red Hat JBoss Enterprise Application Platform 6commons-textNot affected
Red Hat JBoss Enterprise Application Platform 7commons-textWill not fix
39 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-42889.

Public exploits

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

2 more

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

  • Emerging Threats Open ET EXPLOIT Possible Apache Text4shell RCE Attempt Script Prefix (CVE-2022-42889) (Inbound) sid 2039464
  • Emerging Threats Open ET EXPLOIT Possible Apache Text4shell RCE Attempt Script Prefix (CVE-2022-42889) (Outbound) sid 2039465
  • Emerging Threats Open ET EXPLOIT Possible Apache Text4shell RCE Attempt DNS Prefix (CVE-2022-42889) (Inbound) sid 2039466
  • Emerging Threats Open ET EXPLOIT Possible Apache Text4shell RCE Attempt DNS Prefix (CVE-2022-42889) (Outbound) sid 2039467
  • Emerging Threats Open ET EXPLOIT Possible Apache Text4shell RCE Attempt URL Prefix (CVE-2022-42889) (Inbound) sid 2039468
  • Emerging Threats Open ET EXPLOIT Possible Apache Text4shell RCE Attempt URL Prefix (CVE-2022-42889) (Outbound) sid 2039469
  • Emerging Threats Open ET EXPLOIT Possible Apache Text4shell RCE Attempt JEXL Path (CVE-2022-42889) (Inbound) sid 2039470
  • Emerging Threats Open ET EXPLOIT Possible Apache Text4shell RCE Attempt JEXL Path (CVE-2022-42889) (Outbound) sid 2039471

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON