CVE-2013-6429: Cross-Site Request Forgery in Spring Framework
Summary
CVE-2013-6429: Cross-Site Request Forgery in Spring Framework. Affects org.springframework:spring-web versions < 3.2.5.RELEASE. Fixed in 3.2.5.RELEASE. How to fix ↓
Also tracked for
- libspring-java · Debian:11
The same CVE-2013-6429 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Spring Framework is a popular open-source application framework for Java. It provides comprehensive infrastructure support for developing Java applications. The Spring Web module, specifically the Spring MVC component, is responsible for handling web requests and building web applications. This vulnerability affects versions before 3.2.5 and 4.0.0.M1 through 4.0.0.RC1 of the Spring Framework.
Vulnerability Detail
The vulnerability, known as XML External Entity (XXE), exists in the SourceHttpMessageConverter component of Spring MVC. It allows remote attackers to read arbitrary files, cause a denial of service, and conduct Cross-Site Request Forgery (CSRF) attacks by exploiting the lack of disabled external entity resolution. This vulnerability is distinct from CVE-2013-4152 and CVE-2013-7315.
How To Fix
Minimum fixed version
3.2.5.RELEASE
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading to a newer version of the Spring Framework is not immediately feasible, a temporary workaround is to disable external entity resolution in the SourceHttpMessageConverter. This can be achieved by configuring the XML parser to disallow external entities. Here is an example of how to configure the XML parser in Spring MVC:
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
for (HttpMessageConverter<?> converter : converters) {
if (converter instanceof SourceHttpMessageConverter) {
((SourceHttpMessageConverter<?>) converter).setProcessExternalEntities(false);
}
}
}
}
Conclusion
The Cross-Site Request Forgery vulnerability in the Spring Framework can have serious consequences, including unauthorized access to sensitive information and potential disruption of the affected application. It is crucial to upgrade to a non-vulnerable version of the Spring Framework or apply the recommended workaround to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.springframework:spring-web →
FAQ
This vulnerability allows remote attackers to read arbitrary files, cause a denial of service, and conduct CSRF attacks. It can lead to unauthorized access to sensitive information and potential disruption of the affected application.
Versions before 3.2.5 and 4.0.0.M1 through 4.0.0.RC1 of the Spring Framework are affected by this vulnerability.
Yes, upgrading to Spring Framework version 3.2.5.RELEASE or later will fix this vulnerability.
If immediate upgrade is not possible, a temporary workaround is to disable external entity resolution in the SourceHttpMessageConverter by configuring the XML parser to disallow external entities.
No, this vulnerability is distinct from CVE-2013-4152 and CVE-2013-7315.
References
Related vulnerabilities
Recent vulnerabilities recorded for org.springframework:spring-web.