CVE-2020-14338: XercesImpl Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-w4jq-qh47-hvjq
CVSS 5.3
CWE-20
Published
Advisory Summary

CVE-2020-14338 is a MODERATE (CVSS 5.3) remote code execution vulnerability (CWE-20: Improper Input Validation) affecting XercesImpl libraries in the Maven ecosystem. The issue involves improper input validation in xerces. Remediation is available by upgrading affected packages to version 2.12.0.sp3.

CVE-2020-14338 at a Glance

CVE Identifier CVE-2020-14338
GHSA Identifier GHSA-w4jq-qh47-hvjq
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-20: Improper Input Validation
Affected Product XercesImpl
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2020-14338

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

xerces:xercesImpl fixed: 2.12.0.sp3
<dependency>
    <groupId>xerces</groupId>
    <artifactId>xercesImpl</artifactId>
    <version>2.12.0.sp3</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=xerces

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=xerces

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

Note: The mvn dependency:tree -Dincludes=xerces 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In XercesImpl, 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

A flaw was found in Wildfly's implementation of Xerces, specifically in the way the XMLSchemaValidator class in the JAXP component of Wildfly enforced the "use-grammar-pool-only" feature. This flaw allows a specially-crafted XML file to manipulate the validation process in certain cases. This issue is the same flaw as CVE-2020-14621, which affected OpenJDK, and uses a similar code. All xerces jboss versions before 2.12.0.SP3.

CVE-2020-14338 Affected XercesImpl Versions

1 component(s)
Fixed Versions:
2.12.0.sp3
Product / Package Ecosystem Affected Versions Fixed Version
xerces:xercesImpl
Maven
< 2.12.0.sp3
2.12.0.sp3

References

Frequently Asked Questions

What is CVE-2020-14338?
CVE-2020-14338 is a security vulnerability in XercesImpl involving Improper Input Validation in Xerces under CWE-20: Improper Input Validation.
Which XercesImpl versions are affected?
Affected versions include releases prior to 2.12.0.sp3 across affected packages: xerces:xercesImpl.
What version fixes CVE-2020-14338?
Upgrading to 2.12.0.sp3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xercesImpl affected?
Yes, xerces:xercesImpl is affected in releases prior to 2.12.0.sp3. Upgrade your dependency to 2.12.0.sp3 or later.
What is the CVSS score of CVE-2020-14338?
CVE-2020-14338 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2020-14338?
CVE-2020-14338 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Maven dependencies for CVE-2020-14338?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=xerces'. 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-w4jq-qh47-hvjq",
  "modified" : "2022-06-24T01:25:49Z",
  "published" : "2022-02-15T01:37:41Z",
  "aliases" : [ "CVE-2020-14338" ],
  "summary" : "Improper Input Validation in Xerces",
  "details" : "A flaw was found in Wildfly's implementation of Xerces, specifically in the way the XMLSchemaValidator class in the JAXP component of Wildfly enforced the \"use-grammar-pool-only\" feature. This flaw allows a specially-crafted XML file to manipulate the validation process in certain cases. This issue is the same flaw as CVE-2020-14621, which affected OpenJDK, and uses a similar code. All xerces jboss versions before 2.12.0.SP3.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "xerces:xercesImpl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.12.0.sp3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.12.0.sp2"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-14338"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1860054"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rf96c5afb26b596b4b97883aa90b6c0b0fc4c26aaeea7123c21912103@%3Cj-users.xerces.apache.org%3E"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-24T01:25:49Z",
    "nvd_published_at" : "2020-09-17T15:15:00Z"
  }
}