Skip to main content

Spring Security Advisories

CVE-2013-4152 XML eXternal Entity (XXE) injection in Spring Framework

HIGH | AUGUST 22, 2013 | CVE-2013-4152

Description

The Spring OXM wrapper did not expose any property for disabling entity resolution when using the JAXB unmarshaller. There are four possible source implementations passed to the unmarshaller: DOMSource, StAXSource, SAXSource and StreamSource.

For a DOMSource, the XML has already been parsed by user code and that code is responsible for protecting against XXE.

For a StAXSource, the XMLStreamReader has already been created by user code and that code is responsible for protecting against XXE.

For SAXSource and StreamSource instances, Spring processed external entities by default thereby creating this vulnerability.

The issue was resolved by disabling external entity processing by default and adding an option to enable it for those users that need to use this feature when processing XML from a trusted source.

Affected Spring Products and Versions

  • 3.0.0 to 3.2.3
  • 4.0.0.M1
  • Earlier unsupported versions may be affected

Mitigation

Users of affected versions should apply the following mitigation:

  • Users of 3.x should upgrade to 3.2.4 or later
  • Users of 4.x should upgrade to 4.0.0.M2 or later

Credit

These issues were identified by Alvaro Munoz of the HP Enterprise Security Team.

History

  • 2013-Aug-22: Initial vulnerability report published.
  • 2014-Jun-19: Updated to remove Spring MVC aspects which have been split off into CVE-2013-7315

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all

© 2023 VMware, Inc. or its affiliates. Terms of Use PrivacyTrademark Guidelines Your California Privacy Rights Cookie Settings

Apache®, Apache Tomcat®, Apache Kafka®, Apache Cassandra™, and Apache Geode™ are trademarks or registered trademarks of the Apache Software Foundation in the United States and/or other countries. Java™, Java™ SE, Java™ EE, and OpenJDK™ are trademarks of Oracle and/or its affiliates. Kubernetes® is a registered trademark of the Linux Foundation in the United States and other countries. Linux® is the registered trademark of Linus Torvalds in the United States and other countries. Windows® and Microsoft® Azure are registered trademarks of Microsoft Corporation. “AWS” and “Amazon Web Services” are trademarks or registered trademarks of Amazon.com Inc. or its affiliates. All other trademarks and copyrights are property of their respective owners and are only mentioned for informative purposes. Other names may be trademarks of their respective owners.