Remote code executionin the org.apache.commons:commons-text package.
Weaponized: a Metasploit exploit is public.
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.
- Upgrade org.apache.commons:commons-text (Maven) to 1.10.0 or later.
- Can't upgrade today? Upgrade to Apache Commons Text 1.10.0.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 12 Oct 2022CVE ID reserved by apache.
- 13 Oct 2022Published in the CVE List.
- 13 Oct 2022Metasploit module: Apache Commons Text RCE.
- 17 Oct 2022First public proof of concept on GitHub.
- 20 Nov 2024CVE record last updated.
Attack code anyone can find
Exploit maturity: Weaponized (Metasploit). CISA assessment (SSVC): exploitation none.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
- lists.apache.org
- www.openwall.com mailing-list
- www.openwall.com mailing-list
- security.netapp.com
- psirt.global.sonicwall.com
- security.gentoo.org vendor-advisory
- seclists.org mailing-list
- packetstormsecurity.com
- packetstormsecurity.com
Patchminder. CVE-2022-42889: Remote code execution in the org.apache.commons:commons-text package. https://patchminder.com/cve/cve-2022-42889/ (accessed 5 December 2026).