{"answers":{"affected":"4 open source packages ship an affected version, including org.apache.commons:commons-text and com.guicedee.services:commons-text. It affects 3 products.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-42889 exists.","fix":"Upgrade org.apache.commons:commons-text to 1.10.0 or later.","what":"CVE-2022-42889 is a critical code injection vulnerability in Apache Commons Text, published on 13 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-42889 and fix it if it is affected.\n\nWhat it is: CVE-2022-42889 is a critical code injection vulnerability in Apache Commons Text, published on 13 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-42889 exists.\n\nAffected packages and fixed versions:\n- org.apache.commons:commons-text (Maven): affected from 1.5; fixed in 1.10.0\n- org.apache.commons:commons-text (Maven): affected from 1.5; fixed in 1.10.0\n- com.guicedee.services:commons-text (Maven): affected all versions up to 1.2.2.1-jre17; no fix listed\n- com.guicedee.services:commons-text (Maven): affected all versions up to 1.2.2.1-jre17; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-42889/ (Markdown: https://insights.sbomify.com/CVE-2022-42889/index.md)","id":"CVE-2022-42889","markdown":"https://insights.sbomify.com/CVE-2022-42889/index.md","name":"CVE-2022-42889","record":{"aliases":["CLEANSTART-2026-ML52514","DEBIAN-CVE-2022-42889","GHSA-599f-7c49-w659","RHSA-2023:1524","ROOT-APP-MAVEN-CVE-2022-42889","UBUNTU-CVE-2022-42889","openSUSE-SU-2024:12409-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Java text library","requires_auth":"none","summary":"Attackers can execute arbitrary code or trigger SSRF by exploiting insecure default interpolators in Apache Commons Text when processing untrusted input.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"apache","cpe":[{"product":"commons_text","vendor":"apache"},{"product":"security_threat_response_manager","vendor":"juniper"},{"product":"bluexp","vendor":"netapp"}],"cvss":{"score":9.8,"severity":"critical","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"description":"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.","ecosystems":["Maven","Red Hat:openshift:4.9::el8","openSUSE:Tumbleweed"],"exploits":{"exploitdb":1,"first_seen":"2022-10-13","github_poc":51,"max_poc_stars":76,"metasploit":1,"nuclei":0,"refs":[{"date":"2022-10-18T09:58:00Z","kind":"github_poc","ref":"https://github.com/karthikuj/cve-2022-42889-text4shell-docker","stars":76,"title":"Dockerized POC for CVE-2022-42889 Text4Shell"},{"date":"2022-10-19T11:49:08Z","kind":"github_poc","ref":"https://github.com/kljunowsky/CVE-2022-42889-text4shell","stars":58,"title":"Apache commons text - CVE-2022-42889 Text4Shell proof of concept exploit."},{"date":"2022-10-18T13:53:55Z","kind":"github_poc","ref":"https://github.com/ClickCyber/cve-2022-42889","stars":40,"title":"cve-2022-42889 Text4Shell CVE-2022-42889 affects Apache Commons Text versions 1.5 through 1.9. It has been patched as of Commons Text version 1.10. "},{"date":"2022-10-17T18:50:36Z","kind":"github_poc","ref":"https://github.com/SeanWrightSec/CVE-2022-42889-PoC","stars":35,"title":"Proof of Concept for the Apache commons-text vulnerability CVE-2022-42889."},{"date":"2022-10-23T13:42:23Z","kind":"github_poc","ref":"https://github.com/cxzero/CVE-2022-42889-text4shell","stars":21,"title":"CVE-2022-42889 aka Text4Shell research \u0026 PoC"},{"date":"2022-12-09T08:18:19Z","kind":"github_poc","ref":"https://github.com/f0ng/text4shellburpscanner","stars":20,"title":"text4shell(CVE-2022-42889) BurpSuite Scanner"},{"date":"2022-11-04T19:26:23Z","kind":"github_poc","ref":"https://github.com/cryxnet/CVE-2022-42889-RCE","stars":15,"title":"Proof of Concept for CVE-2022-42889 (Text4Shell Vulnerability) "},{"date":"2023-06-27T08:29:24Z","kind":"github_poc","ref":"https://github.com/alealeluyah/CVE-2022-42889-Text4Shell-POC","stars":13,"title":"This repository contains a Python script to automate the process of testing for a vulnerability known as Text4Shell, referenced under the CVE id: CVE-2022-42889.  "}],"tier":"weaponised"},"has_fix":true,"headline":"Apache Commons Text prior to 1.10.0 allows RCE when applied to untrusted input due to insecure interpolation defaults","id":"CVE-2022-42889","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"code_injection","year":"2022"},"n_packages":6,"n_references":9,"next":{"headline":"Apache Batik prior to 1.16 allows RCE via scripting","id":"CVE-2022-42890"},"packages":[{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":["1.2.2.1-jre17"],"package":"com.guicedee.services:commons-text","purl":null,"source":"GHSA-599f-7c49-w659"},{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":["1.2.2.1-jre17"],"package":"com.guicedee.services:commons-text","purl":"pkg:maven/com.guicedee.services/commons-text","source":"GHSA-599f-7c49-w659"},{"ecosystem":"Maven","fixed":["1.10.0"],"introduced":["1.5"],"last_affected":[],"package":"org.apache.commons:commons-text","purl":null,"source":"GHSA-599f-7c49-w659"},{"ecosystem":"Maven","fixed":["1.10.0"],"introduced":["1.5"],"last_affected":[],"package":"org.apache.commons:commons-text","purl":"pkg:maven/org.apache.commons/commons-text","source":"GHSA-599f-7c49-w659"},{"ecosystem":"Red Hat:openshift:4.9::el8","fixed":["0:4.9.1680069756-1.el8"],"introduced":["0"],"last_affected":[],"package":"jenkins-2-plugins","purl":"pkg:rpm/redhat/jenkins-2-plugins","source":"RHSA-2023:1524"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["1.10.0-1.1"],"introduced":["0"],"last_affected":[],"package":"apache-commons-text","purl":"pkg:rpm/opensuse/apache-commons-text\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:12409-1"}],"prev":{"headline":"WordPress ARMember Plugin \u003c= 5.5.1 is vulnerable to Privilege Escalation","id":"CVE-2022-42888"},"products":["Apache Commons Text"],"published":"2022-10-13","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-11-20","vendors":["Apache Software Foundation"]},"summary":"Attackers can execute arbitrary code or trigger SSRF by exploiting insecure default interpolators in Apache Commons Text when processing untrusted input.","url":"https://insights.sbomify.com/CVE-2022-42889/"}