CVE-2016-5007 Spring Security and Spring Framework may not recognize certain paths that should be protected

High 7.5 Published Updated

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.

PackageAffectedFixed in
org.springframework.security:spring-security-core MavenAll versions4.1.1
org.springframework.security:spring-security-core MavenAll versions4.1.1
org.springframework:spring-core MavenAll versions4.3.1
org.springframework:spring-core MavenAll versions4.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.

All Vmware Spring Framework vulnerabilities

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.

Is CVE-2016-5007 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free