CVE-2013-4002: XercesImpl Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-7j4h-8wpf-rqfh
CWE-112
Published
Advisory Summary

CVE-2013-4002 is a HIGH remote code execution vulnerability (CWE-112: Missing XML Validation) affecting XercesImpl libraries in the Maven ecosystem. The issue involves missing xml validation in apache xerces2. Remediation is available by upgrading affected packages to version 2.12.0.

CVE-2013-4002 at a Glance

CVE Identifier CVE-2013-4002
GHSA Identifier GHSA-7j4h-8wpf-rqfh
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-112: Missing XML Validation
Affected Product XercesImpl
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2013-4002

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
<dependency>
    <groupId>xerces</groupId>
    <artifactId>xercesImpl</artifactId>
    <version>2.12.0</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-2013-4002, 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), 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-112: Missing XML Validation, where the product accepts xml from an untrusted source but does not validate the xml against the proper schema. 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

XMLscanner.java in Apache Xerces2 Java Parser before 2.12.0, as used in the Java Runtime Environment (JRE) in IBM Java 5.0 before 5.0 SR16-FP3, 6 before 6 SR14, 6.0.1 before 6.0.1 SR6, and 7 before 7 SR5 as well as Oracle Java SE 7u40 and earlier, Java SE 6u60 and earlier, Java SE 5.0u51 and earlier, JRockit R28.2.8 and earlier, JRockit R27.7.6 and earlier, Java SE Embedded 7u40 and earlier, and possibly other products allows remote attackers to cause a denial of service via vectors related to XML attribute names.

CVE-2013-4002 Affected XercesImpl Versions

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

References

rhn.redhat.com/errata/rhsa-2013-15... WEB
http://rhn.redhat.com/errata/RHSA-2013-1505.html
rhn.redhat.com/errata/rhsa-2014-18... WEB
http://rhn.redhat.com/errata/RHSA-2014-1818.html
rhn.redhat.com/errata/rhsa-2014-18... WEB
http://rhn.redhat.com/errata/RHSA-2014-1821.html
rhn.redhat.com/errata/rhsa-2014-18... WEB
http://rhn.redhat.com/errata/RHSA-2014-1822.html
rhn.redhat.com/errata/rhsa-2014-18... WEB
http://rhn.redhat.com/errata/RHSA-2014-1823.html
rhn.redhat.com/errata/rhsa-2015-06... WEB
http://rhn.redhat.com/errata/RHSA-2015-0675.html
NVD — CVE-2013-4002 NVD
https://nvd.nist.gov/vuln/detail/CVE-2013-4002
Security Fix Commit FIX COMMIT
https://github.com/apache/xerces2-j/commit/266e837852e0f0e3c8c1ad572b6fc4dbb4ded17
access.redhat.com/errata/rhsa-2014:04... WEB
https://access.redhat.com/errata/RHSA-2014:0414
exchange.xforce.ibmcloud.com/vulnerabilities/852... WEB
https://exchange.xforce.ibmcloud.com/vulnerabilities/85260
XercesImpl Source Repository REPOSITORY
https://github.com/apache/xerces2-j
issues.apache.org/jira/browse/xercesj... WEB
https://issues.apache.org/jira/browse/XERCESJ-1679
lists.opensuse.org/opensuse-updates/20... WEB
http://lists.opensuse.org/opensuse-updates/2013-11/msg00023.html
marc.info/ WEB
http://marc.info/?l=bugtraq&m=138674073720143&w=2
rhn.redhat.com/errata/rhsa-2013-10... WEB
http://rhn.redhat.com/errata/RHSA-2013-1059.html
rhn.redhat.com/errata/rhsa-2013-10... WEB
http://rhn.redhat.com/errata/RHSA-2013-1060.html
rhn.redhat.com/errata/rhsa-2013-10... WEB
http://rhn.redhat.com/errata/RHSA-2013-1081.html
rhn.redhat.com/errata/rhsa-2013-14... WEB
http://rhn.redhat.com/errata/RHSA-2013-1440.html
rhn.redhat.com/errata/rhsa-2013-14... WEB
http://rhn.redhat.com/errata/RHSA-2013-1447.html
rhn.redhat.com/errata/rhsa-2013-14... WEB
http://rhn.redhat.com/errata/RHSA-2013-1451.html
lists.apache.org/thread.html/49dc670... WEB
https://lists.apache.org/thread.html/49dc6702104a86ecbb40292dcd329ce9ae4c32b74733199ecab14a73@%3Cj-users.xerces.apache.org%3E
lists.apache.org/thread.html/708d941... WEB
https://lists.apache.org/thread.html/708d94141126eac03011144a971a6411fcac16d9c248d1d535a39451@%3Csolr-user.lucene.apache.org%3E
lists.apache.org/thread.html/r204ba2... WEB
https://lists.apache.org/thread.html/r204ba2a9ea750f38d789d2bb429cc0925ad6133deea7cbc3001d96b5@%3Csolr-user.lucene.apache.org%3E
XercesImpl Security Information SECURITY
https://www.oracle.com/security-alerts/cpuapr2022.html
XercesImpl Security Information SECURITY
https://www.oracle.com/technetwork/topics/security/cpuoct2013-1899837.html
XercesImpl Security Information SECURITY
http://lists.apple.com/archives/security-announce/2013/Oct/msg00001.html
XercesImpl Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2013-07/msg00026.html
XercesImpl Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2013-07/msg00027.html
XercesImpl Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2013-07/msg00028.html
XercesImpl Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2013-07/msg00029.html
XercesImpl Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2013-08/msg00000.html
XercesImpl Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2013-08/msg00003.html
XercesImpl Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2013-11/msg00010.html
marc.info/ WEB
http://marc.info/?l=bugtraq&m=138674031212883&w=2
rhn.redhat.com/errata/rhsa-2015-07... WEB
http://rhn.redhat.com/errata/RHSA-2015-0720.html
rhn.redhat.com/errata/rhsa-2015-07... WEB
http://rhn.redhat.com/errata/RHSA-2015-0765.html
rhn.redhat.com/errata/rhsa-2015-07... WEB
http://rhn.redhat.com/errata/RHSA-2015-0773.html
XercesImpl Security Information SECURITY
http://security.gentoo.org/glsa/glsa-201406-32.xml
support.apple.com/kb/ht5982 WEB
http://support.apple.com/kb/HT5982
svn.apache.org/viewvc/xerces/java/... WEB
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/XMLScanner.java?r1=965250&r2=1499506&view=patch
www-01.ibm.com/support/docview.wss WEB
http://www-01.ibm.com/support/docview.wss?uid=swg1IC98015
www-01.ibm.com/support/docview.wss WEB
http://www-01.ibm.com/support/docview.wss?uid=swg21644197
www-01.ibm.com/support/docview.wss WEB
http://www-01.ibm.com/support/docview.wss?uid=swg21653371
www-01.ibm.com/support/docview.wss WEB
http://www-01.ibm.com/support/docview.wss?uid=swg21657539
XercesImpl Security Information SECURITY
http://www.hitachi.co.jp/Prod/comp/soft1/global/security/info/vuls/HS13-025/index.html
XercesImpl Security Information SECURITY
http://www.ibm.com/connections/blogs/PSIRT/entry/security_bulletin_ibm_filenet_content_manager_and_ibm_content_foundation_xml_4j_denial_of_service_attack_cve_2013_4002
www.ibm.com/developerworks/java... WEB
http://www.ibm.com/developerworks/java/jdk/alerts/#IBM_Security_Update_July_2013
www.ibm.com/support/docview.wss WEB
http://www.ibm.com/support/docview.wss?uid=swg21648172
www.ubuntu.com/usn/usn-2033-1 WEB
http://www.ubuntu.com/usn/USN-2033-1
www.ubuntu.com/usn/usn-2089-1 WEB
http://www.ubuntu.com/usn/USN-2089-1

Frequently Asked Questions

What is CVE-2013-4002?
CVE-2013-4002 is a security vulnerability in XercesImpl involving Missing XML Validation in Apache Xerces2 under CWE-112: Missing XML Validation.
Which XercesImpl versions are affected?
Affected versions include releases prior to 2.12.0 across affected packages: xerces:xercesImpl.
What version fixes CVE-2013-4002?
Upgrading to 2.12.0 (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. Upgrade your dependency to 2.12.0 or later.
What CWE is associated with CVE-2013-4002?
CVE-2013-4002 is classified under CWE-112: Missing XML Validation (The product accepts XML from an untrusted source but does not validate the XML against the proper schema.).
How can I check Maven dependencies for CVE-2013-4002?
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-7j4h-8wpf-rqfh",
  "modified" : "2024-03-05T17:50:14Z",
  "published" : "2022-05-13T01:01:06Z",
  "aliases" : [ "CVE-2013-4002" ],
  "summary" : "Missing XML Validation in Apache Xerces2",
  "details" : "XMLscanner.java in Apache Xerces2 Java Parser before 2.12.0, as used in the Java Runtime Environment (JRE) in IBM Java 5.0 before 5.0 SR16-FP3, 6 before 6 SR14, 6.0.1 before 6.0.1 SR6, and 7 before 7 SR5 as well as Oracle Java SE 7u40 and earlier, Java SE 6u60 and earlier, Java SE 5.0u51 and earlier, JRockit R28.2.8 and earlier, JRockit R27.7.6 and earlier, Java SE Embedded 7u40 and earlier, and possibly other products allows remote attackers to cause a denial of service via vectors related to XML attribute names.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "xerces:xercesImpl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.12.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-4002"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/xerces2-j/commit/266e837852e0f0e3c8c1ad572b6fc4dbb4ded17"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2014:0414"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/85260"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/xerces2-j"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/XERCESJ-1679"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/49dc6702104a86ecbb40292dcd329ce9ae4c32b74733199ecab14a73@%3Cj-users.xerces.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/708d94141126eac03011144a971a6411fcac16d9c248d1d535a39451@%3Csolr-user.lucene.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r204ba2a9ea750f38d789d2bb429cc0925ad6133deea7cbc3001d96b5@%3Csolr-user.lucene.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/topics/security/cpuoct2013-1899837.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.apple.com/archives/security-announce/2013/Oct/msg00001.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2013-07/msg00026.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2013-07/msg00027.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2013-07/msg00028.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2013-07/msg00029.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2013-08/msg00000.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2013-08/msg00003.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2013-11/msg00010.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2013-11/msg00023.html"
  }, {
    "type" : "WEB",
    "url" : "http://marc.info/?l=bugtraq&m=138674031212883&w=2"
  }, {
    "type" : "WEB",
    "url" : "http://marc.info/?l=bugtraq&m=138674073720143&w=2"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1059.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1060.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1081.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1440.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1447.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1451.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2013-1505.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-1818.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-1821.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-1822.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2014-1823.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-0675.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-0720.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-0765.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2015-0773.html"
  }, {
    "type" : "WEB",
    "url" : "http://security.gentoo.org/glsa/glsa-201406-32.xml"
  }, {
    "type" : "WEB",
    "url" : "http://support.apple.com/kb/HT5982"
  }, {
    "type" : "WEB",
    "url" : "http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/XMLScanner.java?r1=965250&r2=1499506&view=patch"
  }, {
    "type" : "WEB",
    "url" : "http://www-01.ibm.com/support/docview.wss?uid=swg1IC98015"
  }, {
    "type" : "WEB",
    "url" : "http://www-01.ibm.com/support/docview.wss?uid=swg21644197"
  }, {
    "type" : "WEB",
    "url" : "http://www-01.ibm.com/support/docview.wss?uid=swg21653371"
  }, {
    "type" : "WEB",
    "url" : "http://www-01.ibm.com/support/docview.wss?uid=swg21657539"
  }, {
    "type" : "WEB",
    "url" : "http://www.hitachi.co.jp/Prod/comp/soft1/global/security/info/vuls/HS13-025/index.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.ibm.com/connections/blogs/PSIRT/entry/security_bulletin_ibm_filenet_content_manager_and_ibm_content_foundation_xml_4j_denial_of_service_attack_cve_2013_4002"
  }, {
    "type" : "WEB",
    "url" : "http://www.ibm.com/developerworks/java/jdk/alerts/#IBM_Security_Update_July_2013"
  }, {
    "type" : "WEB",
    "url" : "http://www.ibm.com/support/docview.wss?uid=swg21648172"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-2033-1"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-2089-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-112" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-08T19:14:49Z",
    "nvd_published_at" : "2013-07-23T11:03:00Z"
  }
}