Vulnerabilities in pkg:maven/org.codehaus.castor/castor
PACKAGECVE-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.
pkg:maven/org.codehaus.castor/castor
Vulnerability advisories affecting package pkg:maven/org.codehaus.castor/castor. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-jwwr-fjgh-cv2x | CVE-2014-3004 | MODERATE | Improper Restriction of XML External Entity Reference in Castor |
CVE-2014-3004 at a Glance
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.
<dependency>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>castor</groupId>
<artifactId>castor</artifactId>
<version>Latest secure release</version>
</dependency>
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
CVE-2014-3004 Affected Castor Versions
2 component(s)| 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?
Which Castor versions are affected?
What version fixes CVE-2014-3004?
Is castor affected?
What CWE is associated with CVE-2014-3004?
How can I check Maven dependencies for CVE-2014-3004?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}