CVE-2018-15758: Privilege Escalation Vulnerability in org.springframework.security.oauth:spring-security-oauth2
Summary
CVE-2018-15758: Authorization bypass in org.springframework.security.oauth:spring-security-oauth2. Affects org.springframework.security.oauth:spring-security-oauth2 across 4 version ranges.
>= 2.0.0, < 2.0.16
>= 2.1.0, < 2.1.3
>= 2.2.0, < 2.2.3.RELEASE
>= 2.3.0, < 2.3.4.RELEASE
Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓
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
org.springframework.security.oauth:spring-security-oauth2 is a Maven package that provides OAuth 2.0 support for Spring Security. It allows developers to implement OAuth 2.0 authorization servers, resource servers, and clients in their applications. This package is widely used in Java applications that require secure authentication and authorization mechanisms.
Vulnerability Detail
The vulnerability, identified as CVE-2018-15758, is a high severity privilege escalation issue in org.springframework.security.oauth:spring-security-oauth2. Versions 2.0.0 to 2.0.16, 2.1.0 to 2.1.3, 2.2.0 to 2.2.3, and 2.3.0 to 2.3.4 are affected. Under certain conditions, a malicious user or attacker can manipulate a request to the approval endpoint, modifying a previously saved authorization request and leading to privilege escalation during subsequent approval. This vulnerability exposes applications that act as an Authorization Server and use a custom Approval Endpoint with AuthorizationRequest as a controller method argument.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
>= 2.0.0, < 2.0.162.0.16 -
>= 2.1.0, < 2.1.32.1.3 -
>= 2.2.0, < 2.2.3.RELEASE2.2.3.RELEASE -
>= 2.3.0, < 2.3.4.RELEASE2.3.4.RELEASE
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no known workaround for this vulnerability. Upgrading to the patched version is the only solution.
Conclusion
The privilege escalation vulnerability in org.springframework.security.oauth:spring-security-oauth2 can lead to unauthorized privilege escalation in applications acting as an Authorization Server with a custom Approval Endpoint. It is crucial to upgrade to the latest patched version (2.0.16, 2.1.3, 2.2.3, or 2.3.4) to mitigate this vulnerability. Regularly updating the package and staying informed about security advisories is essential to ensure the security of your application.
See every vulnerability recorded for org.springframework.security.oauth:spring-security-oauth2 →
FAQ
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your pom.xml file, and Vulert will analyze it in real-time and alert you if any open-source vulnerabilities, including this one, are found.
Disabling the custom Approval Endpoint will prevent the privilege escalation vulnerability. However, this may impact the functionality of your application, especially if it relies on custom approval logic. It is recommended to upgrade to the patched version instead.
There are no known instances of this vulnerability being exploited in the wild. However, it is crucial to apply the necessary security patches to protect your application from potential attacks.
Yes, the CVSS score for this vulnerability is 9.6, indicating a high severity level.
You can find more information about this vulnerability, including its technical details and affected versions, in the GitHub Advisory Database at the following link: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/10/GHSA-h8w4-qv99-f7vj/GHSA-h8w4-qv99-f7vj.json
References
Related vulnerabilities
Recent vulnerabilities recorded for org.springframework.security.oauth:spring-security-oauth2.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.