CVE-2014-3004: Castor Improper Restriction Of XML External Vulnerability

MODERATE
Advisory Identifier: GHSA-jwwr-fjgh-cv2x
CWE-611
Published
Advisory Summary

CVE-2014-3004 is a MODERATE improper restriction of xml external vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Castor libraries in the Maven ecosystem. The issue involves improper restriction of xml external entity reference in castor. Remediation is available by upgrading affected packages to version 1.3.3.

CVE-2014-3004 at a Glance

CVE Identifier CVE-2014-3004
GHSA Identifier GHSA-jwwr-fjgh-cv2x
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Castor
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2014-3004

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

org.codehaus.castor:castor fixed: 1.3.3
<dependency>
    <groupId>org.codehaus.castor</groupId>
    <artifactId>castor</artifactId>
    <version>1.3.3</version>
</dependency>
castor:castor fixed: Latest secure release
<dependency>
    <groupId>castor</groupId>
    <artifactId>castor</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=org.codehaus.castor

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.codehaus.castor

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

Note: The mvn dependency:tree -Dincludes=org.codehaus.castor 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 Castor, 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

The default configuration for the Xerces SAX Parser in Castor before 1.3.3 allows context-dependent attackers to conduct XML External Entity (XXE) attacks via a crafted XML document.

CVE-2014-3004 Affected Castor Versions

2 component(s)
Fixed Versions:
1.3.3
Product / Package Ecosystem Affected Versions Fixed Version
org.codehaus.castor:castor
Maven
< 1.3.3
1.3.3
castor:castor
Maven
≤ 1.0

References

Frequently Asked Questions

What is CVE-2014-3004?
CVE-2014-3004 is a security vulnerability in Castor involving Improper Restriction of XML External Entity Reference in Castor under CWE-611: Improper Restriction of XML External Entity Reference.
Which Castor versions are affected?
Affected versions include releases prior to 1.3.3 across affected packages: org.codehaus.castor:castor, castor:castor.
What version fixes CVE-2014-3004?
Upgrading to 1.3.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is castor affected?
Yes, org.codehaus.castor:castor is affected in releases prior to 1.3.3, Latest secure release. Upgrade your dependency to 1.3.3, Latest secure release or later.
What CWE is associated with CVE-2014-3004?
CVE-2014-3004 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-2014-3004?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.codehaus.castor'. 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-jwwr-fjgh-cv2x",
  "modified" : "2026-04-16T18:07:55Z",
  "published" : "2022-05-13T01:05:37Z",
  "aliases" : [ "CVE-2014-3004" ],
  "summary" : "Improper Restriction of XML External Entity Reference in Castor",
  "details" : "The default configuration for the Xerces SAX Parser in Castor before 1.3.3 allows context-dependent attackers to conduct XML External Entity (XXE) attacks via a crafted XML document.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.codehaus.castor:castor"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "castor:castor"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2014-3004"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/castor-data-binding/castor"
  }, {
    "type" : "WEB",
    "url" : "https://quickview.cloudapps.cisco.com/quickview/bug/CSCvm56811"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujan2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2021.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2014-06/msg00043.html"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/126854/Castor-Library-XXE-Disclosure.html"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2014/May/142"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-07T22:43:25Z",
    "nvd_published_at" : "2014-06-11T14:55:00Z"
  }
}