{"id":"CVE-2022-42889","published":"2022-10-13T00:00:00Z","modified":"2024-11-20T16:19:41Z","title":"Apache Commons Text prior to 1.10.0 allows RCE when applied to untrusted input due to insecure interpolation defaults","vendor":"Apache Software Foundation","product":"Apache Commons Text","tier":"core","eol":null,"affectedVersions":[{"vendor":"Apache Software Foundation","product":"Apache Commons Text","versions":[">= unspecified, <= 1.9",">= 1.5, < Apache Commons Text*"]}],"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"Apache Commons Text, in versions prior to 1.10.0, has insecure default variable interpolation that enables the \"script\", \"dns\" and \"url\" lookups, which can be abused when untrusted input is interpolated.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:13:42Z"},"cvss":null,"epss":{"score":0.99931,"percentile":0.9997,"date":"2026-10-29","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2023-01-12","exploitedFirstSeen":"2023-01-12","ransomware":false,"evidence":[{"url":"https://web.archive.org/web/20230318134256/https://unit42.paloaltonetworks.com/network-security-trends-aug-oct-2022/","date":"2023-01-12"},{"url":"https://go.catonetworks.com/rs/245-RJK-441/images/CATO-NETWORKS-THREAT-REPORT2024.pdf","date":"2024-05-07"},{"url":"https://app.crowdsec.net/cti/cve-explorer/CVE-2022-42889","date":"2025-06-07"},{"url":"https://www.linkedin.com/pulse/nervous-burlywood-becard-campaign-leverages-log4j-other-exploits-zxqwf/","date":"2025-09-29"}],"evidenceTotal":4,"provenance":"source"},"exploited":true,"otx":{"pulseCount":24,"pulses":[{"name":"Midwest Malware","url":"https://otx.alienvault.com/pulse/6a8e6c8dc6d3df83aac08378","created":"2026-08-26"},{"name":"ripe.arin.enom.cpanel.cpcalendar.iana.networksolutions.02050.webdisk.webmail.","url":"https://otx.alienvault.com/pulse/69fdc02bea1e4ec923b01688","created":"2026-05-08"},{"name":"ACTUALIZACION | Oracle Critical Patch Update Advisory - January 2024","url":"https://otx.alienvault.com/pulse/65c0fd55c5d3c780a06aa227","created":"2024-02-05"},{"name":"IOC's found on my pesonal devices; week starting 08/14/23","url":"https://otx.alienvault.com/pulse/65709ffcf3ffe737f8cb8dfd","created":"2023-12-06"},{"name":"IOC's found on my pesonal devices; week starting 08/14/23","url":"https://otx.alienvault.com/pulse/64dd9c1d76a7807782a691d3","created":"2023-08-17"},{"name":"Red Hat Customer Portal - Access to 24x7 support and knowledge","url":"https://otx.alienvault.com/pulse/642ef99f271e5282569ad5a3","created":"2023-04-06"},{"name":"ACTUALIZACION | Función para actualizar la pila de Java | SUSE","url":"https://otx.alienvault.com/pulse/641b243b14df3b7fd67f735f","created":"2023-03-22"},{"name":"ACTUALIZACION | - Access to 24x7 support and knowledge","url":"https://otx.alienvault.com/pulse/63c97857b6dd97bca7aab78d","created":"2023-01-19"},{"name":"Security Bulletin: IBM Synthetic Playback Agent is vulnerable due to its use of Apache Commons Text  [CVE-2022-42889]","url":"https://otx.alienvault.com/pulse/63adad24f38c909482458f9d","created":"2022-12-29"},{"name":"Proof Point Emerging Exploit list","url":"https://otx.alienvault.com/pulse/6399fdc966948f6b537b9762","created":"2022-12-14"}],"provenance":"machine"},"cwes":[],"references":[{"url":"https://lists.apache.org/thread/n2bd4vdsgkqh2tm14l1wyc3jyol7s1om","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2022/10/13/4","tags":["mailing-list"]},{"url":"http://www.openwall.com/lists/oss-security/2022/10/18/1","tags":["mailing-list"]},{"url":"https://security.netapp.com/advisory/ntap-20221020-0004/","tags":[]},{"url":"https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2022-0022","tags":[]},{"url":"https://security.gentoo.org/glsa/202301-05","tags":["vendor-advisory"]},{"url":"http://seclists.org/fulldisclosure/2023/Feb/3","tags":["mailing-list"]},{"url":"http://packetstormsecurity.com/files/171003/OX-App-Suite-Cross-Site-Scripting-Server-Side-Request-Forgery.html","tags":[]},{"url":"http://packetstormsecurity.com/files/176650/Apache-Commons-Text-1.9-Remote-Code-Execution.html","tags":[]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"Maven","package":"org.apache.commons:commons-text","vulnerableRanges":[">=1.5, <1.10.0"],"patched":["1.10.0"],"from":["GHSA-599f-7c49-w659"],"provenance":"source"},{"ecosystem":"Maven","package":"com.guicedee.services:commons-text","vulnerableRanges":["<=1.2.2.1-jre17"],"patched":[],"from":["GHSA-599f-7c49-w659"],"provenance":"source"}],"advisories":[{"id":"GHSA-599f-7c49-w659","url":"https://github.com/advisories/GHSA-599f-7c49-w659","severity":"CRITICAL","ecosystem":"Maven","package":"org.apache.commons:commons-text","vulnerableRanges":[">=1.5, <1.10.0"],"patched":["1.10.0"],"provenance":"source","from":"GHSA"},{"id":"GHSA-599f-7c49-w659","url":"https://github.com/advisories/GHSA-599f-7c49-w659","severity":"CRITICAL","ecosystem":"Maven","package":"com.guicedee.services:commons-text","vulnerableRanges":["<=1.2.2.1-jre17"],"patched":[],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2022-7022","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-7022","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[{"id":52261,"url":"https://www.exploit-db.com/exploits/52261","title":"Apache Commons Text  1.10.0 - Remote Code Execution","type":"webapps","platform":"multiple","date":"2025-04-18","verified":false,"provenance":"source"}],"exploitSources":{"exploitdb":{"count":1,"earliest":"2025-04-18"},"pocGithub":{"count":41,"skipped":10,"earliest":"2022-10-17","earliestUrl":"https://github.com/SeanWrightSec/CVE-2022-42889-PoC","repos":[{"name":"karthikuj/cve-2022-42889-text4shell-docker","url":"https://github.com/karthikuj/cve-2022-42889-text4shell-docker","stars":76,"created":"2022-10-18"},{"name":"kljunowsky/CVE-2022-42889-text4shell","url":"https://github.com/kljunowsky/CVE-2022-42889-text4shell","stars":58,"created":"2022-10-19"},{"name":"ClickCyber/cve-2022-42889","url":"https://github.com/ClickCyber/cve-2022-42889","stars":40,"created":"2022-10-18"},{"name":"SeanWrightSec/CVE-2022-42889-PoC","url":"https://github.com/SeanWrightSec/CVE-2022-42889-PoC","stars":35,"created":"2022-10-17"},{"name":"cxzero/CVE-2022-42889-text4shell","url":"https://github.com/cxzero/CVE-2022-42889-text4shell","stars":21,"created":"2022-10-23"}]},"metasploit":[{"name":"Apache Commons Text RCE","module":"exploit/multi/http/apache_commons_text4shell","type":"exploit","disclosureDate":"2022-10-13","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/apache_commons_text4shell.rb"}],"first":{"date":"2022-10-13","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/apache_commons_text4shell.rb"},"provenance":"source"},"exploitRefs":["http://packetstormsecurity.com/files/171003/OX-App-Suite-Cross-Site-Scripting-Server-Side-Request-Forgery.html","http://packetstormsecurity.com/files/176650/Apache-Commons-Text-1.9-Remote-Code-Execution.html"],"flow":[],"timeline":[{"date":"2022-10-13","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2022-42889","provenance":"source"},{"date":"2022-10-13","kind":"exploit-public","label":"First public exploit: Metasploit; later: PoC-in-GitHub 2022-10-17, Exploit-DB 2025-04-18","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/apache_commons_text4shell.rb","provenance":"source"},{"date":"2023-01-12","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://web.archive.org/web/20230318134256/https://unit42.paloaltonetworks.com/network-security-trends-aug-oct-2022/","provenance":"source"}],"speed":{"daysToPublicExploit":0,"firstExploitFrom":"Metasploit","daysToKev":null},"priority":{"score":63.0,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 1386 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.99,"detail":"percentile 0.9997"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 Exploit-DB entry; 2 NVD exploit links; 41 PoC-in-GitHub repos; 1 Metasploit module"},{"name":"Mentioned in OTX pulses","points":3.0,"detail":"24 pulses"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}