CVE-2014-3004 — castor
CVE-2014-3004 is a XML External Entity (XXE) vulnerability in org.codehaus.castor:castor. 3 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for org.codehaus.castor:castor — see the affected versions and patch details below.
Improper Restriction of XML External Entity Reference in Castor
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
org.codehaus.castor:castor☕castor:castorReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.codehaus.castor:castor | all versions | 1.3.3org.codehaus.castor:castor:1.3.3 |
| ☕Maven | castor:castor | all versions | No fix |
Affected Products
castorcastor_projectopensuseopensuseopensuseopensuse_projectResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Castor Library - XML External Entity Information Disclosure
by Ron Gutierrez · May 27, 2014
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.codehaus.castor:castor, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.codehaus.castor:castor to 1.3.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2014-3004 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This issue affects the version of castor as shipped with Red Hat Enterprise Linux 5 and 6. The Red Hat Security Response Team has rated this issue as having Moderate security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification:…
"A configuration file in the Java library directory (e.g. /jdk1.2/lib) can be used to override the default configuration file with system-wide properties. In addition, a configuration file can be placed in the classpath and will override both the system wide properties and Castor-default configuration." [1] Adding the following content in any of the above mentioned configuration files will act as a viable mitigation against this flaw. > org.exolab.castor.sax.features=\ > http://apache.org/xml/features/disallow-doctype-decl > > org.exolab.castor.sax.features-to-disable=\ > http://xml.org/sax/features/external-general-entities,\ >…Source: Red Hat security advisory for CVE-2014-3004 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2014-3004 in your dependencies?
Find it across Maven, including transitive dependencies.