Skip to content
Heist/ feed
Back to feed
Unrated

Apache Commons Text prior to 1.10.0 allows RCE when applied to untrusted input due to insecure interpolation defaults

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-42889
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 21:19 UTC · Revision 1

Source evidence

Apache Commons Text prior to 1.10.0 allows RCE when applied to untrusted input due to insecure interpolation defaults

core-osv · Original source

Published 13 Oct 2022, 00:00 UTC

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.

osv:CVE-2022-42889
Complete source record
{
  "id": "50145bbe119fd28f84704b1131988791be61850ed55fd75cfb7fa499b10c73e8",
  "url": "https://osv.dev/vulnerability/CVE-2022-42889",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Apache Commons Text prior to 1.10.0 allows RCE when applied to untrusted input due to insecure interpolation defaults",
    "summary": "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.",
    "evidence": "osv:CVE-2022-42889",
    "products": [],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-42889",
      "aliases": [
        "CVE-2022-42889",
        "GHSA-599f-7c49-w659"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/apache/commons-text",
              "type": "GIT",
              "events": [
                {
                  "introduced": "4736b16d0e644289f3106275ebb1315750234e40"
                },
                {
                  "fixed": "9397c1cdce7e78ffb3f53267d47c857d54c45d1c"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:apache:commons_text:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "1.5"
                      },
                      {
                        "fixed": "1.10.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-42889.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:39.427485131Z",
      "provider": "osv",
      "references": [
        "https://lists.apache.org/thread/n2bd4vdsgkqh2tm14l1wyc3jyol7s1om",
        "https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2022-0022",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/42xxx/CVE-2022-42889.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-42889",
        "https://security.gentoo.org/glsa/202301-05",
        "https://security.netapp.com/advisory/ntap-20221020-0004/"
      ],
      "provider_metadata": {
        "cna_assigner": "apache",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "last_affected": "1.9"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "SplitRange"
              }
            ]
          },
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "1.5"
                  },
                  {
                    "fixed": "Apache Commons Text*"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/42xxx/CVE-2022-42889.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-42889",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 507181,
  "published_at": "2022-10-13T00:00:00+00:00"
}