CVE-2013-6429: Cross-Site Request Forgery in Spring Framework

Summary

13/05/2022
Yes i
Moderate
Not published

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for org.springframework:spring-web.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback