CVE-2021-43142: Jox Improper Restriction Of XML External Vulnerability

MODERATE
Advisory Identifier: GHSA-fcrx-8829-jpqx
CWE-611
Published
Advisory Summary

CVE-2021-43142 is a MODERATE improper restriction of xml external vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Jox libraries in the Maven ecosystem. The issue involves improper restriction of xml external entity reference in wutka jox. Remediation is available in the latest vendor maintenance releases.

CVE-2021-43142 at a Glance

CVE Identifier CVE-2021-43142
GHSA Identifier GHSA-fcrx-8829-jpqx
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Jox
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2021-43142

To remediate this vulnerability, upgrade all affected Jox dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.wutka:jox fixed: Latest secure release
<dependency>
    <groupId>com.wutka</groupId>
    <artifactId>jox</artifactId>
    <version>Latest secure release</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.wutka

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2021-43142, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.wutka

Analyze the terminal output to locate any version of Jox in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.wutka command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Jox, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

An XML External Entity (XXE) vulnerability exists in wutka jox 1.16 in the readObject method in JOXSAXBeanInput.

CVE-2021-43142 Affected Jox Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
com.wutka:jox
Maven
≤ 1.16

References

Frequently Asked Questions

What is CVE-2021-43142?
CVE-2021-43142 is a security vulnerability in Jox involving Improper Restriction of XML External Entity Reference in wutka jox under CWE-611: Improper Restriction of XML External Entity Reference.
Which Jox versions are affected?
Affected versions include releases prior to current release patches across affected packages: com.wutka:jox.
What version fixes CVE-2021-43142?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is jox affected?
Yes, com.wutka:jox is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2021-43142?
CVE-2021-43142 is classified under CWE-611: Improper Restriction of XML External Entity Reference (The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.).
How can I check Maven dependencies for CVE-2021-43142?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.wutka'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fcrx-8829-jpqx",
  "modified" : "2022-04-01T19:59:52Z",
  "published" : "2022-04-01T00:00:45Z",
  "aliases" : [ "CVE-2021-43142" ],
  "summary" : "Improper Restriction of XML External Entity Reference in wutka jox",
  "details" : "An XML External Entity (XXE) vulnerability exists in wutka jox 1.16 in the readObject method in JOXSAXBeanInput.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.wutka:jox"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.16"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-43142"
  }, {
    "type" : "WEB",
    "url" : "https://novysodope.github.io/2021/10/29/64"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-04-01T19:59:52Z",
    "nvd_published_at" : "2022-03-30T22:15:00Z"
  }
}