CVE-2016-5007 Spring Security and Spring Framework may not recognize certain paths that should be protected
Attackers can bypass Spring Security authorization checks by exploiting URL pattern matching discrepancies between Spring Security and Spring Framework.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2016-5007?
CVE-2016-5007 is a high-severity missing authorization vulnerability in Vmware Spring Framework, published on 25 May 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Both Spring Security 3.2.x, 4.0.x, 4.1.0 and the Spring Framework 3.2.x, 4.0.x, 4.1.x, 4.2.x rely on URL pattern mappings for authorization and for mapping requests to controllers respectively. Differences in the strictness of the pattern matching mechanisms, for example with regards to space trimming in path segments, can lead Spring Security to not recognize certain paths as not protected that are in fact mapped to Spring MVC controllers that should be protected. The problem is compounded by the fact that the Spring Framework provides richer features with regards to pattern matching as well as by the fact that pattern matching in each Spring Security and the Spring Framework can easily be customized creating additional differences.
Weakness: CWE-264
Which versions are affected by CVE-2016-5007?
4 open source packages ship an affected version, including org.springframework.security:spring-security-core and org.springframework:spring-core. It affects 3 products.
| Package | Affected | Fixed in |
|---|---|---|
org.springframework.security:spring-security-core Maven | All versions | 4.1.1 |
org.springframework.security:spring-security-core Maven | All versions | 4.1.1 |
org.springframework:spring-core Maven | All versions | 4.3.1 |
org.springframework:spring-core Maven | All versions | 4.3.1 |
Products include Pivotal Software Spring Framework, Vmware Spring Framework, Vmware Spring Security.
How do I fix CVE-2016-5007?
Upgrade org.springframework.security:spring-security-core to 4.1.1 or later.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2016-5007 being exploited?
There is no known exploitation of CVE-2016-5007 in the wild and no public exploit code.
Other vulnerabilities in Vmware Spring Framework
- CVE-2014-0225 Improper Restriction of XML External Entity Reference in Spring Framework
- CVE-2016-9878 Pivotal Spring Framework Paths provided to the ResourceServlet were not properly sanitized
- CVE-2013-6429 Cross-Site Request Forgery in Spring Framework
- CVE-2013-6430 Improper Neutralization of Input During Web Page Generation in Spring Framework
- CVE-2015-0201 Moderate severity vulnerability that affects org.springframework:spring-core
Sources
Also known as CLSA-2026-1778028246, DEBIAN-CVE-2016-5007, GHSA-8crv-49fr-2h6j, OESA-2021-1416, ROOT-APP-MAVEN-CVE-2016-5007, UBUNTU-CVE-2016-5007.