Privilege Escalation Vulnerability in libspring-java: Multipart Request Manipulation
Summary
CVE-2018-1272: Spring Framework, versions 5.0 prior to 5.0.5 and versions 4.3 prior to 4.3.15 and older unsupported versions, provide client-side support for multipart requests. Affects libspring-java across 2 version ranges.
< 4.3.19-1
>= b49d801f241fb8088a5b7514db93fda32c58731c, < 89932891ec67df1f716e65f09826f2647baf2f17
Fixed in 4.3.19-1. 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
libspring-java is a core component of the Spring Framework, widely used for building Java applications. It provides comprehensive support for web applications, including features for handling multipart requests. This functionality is crucial for applications that need to upload files or handle complex data submissions. However, certain versions of libspring-java are vulnerable to a specific attack vector that can lead to privilege escalation.
Vulnerability Detail
The vulnerability (CVE-2018-1272) arises when a Spring MVC or Spring WebFlux server application (server A) receives input from a remote client and subsequently makes a multipart request to another server (server B) using that input. An attacker can exploit this by inserting an extra multipart in the request content from server A, which may cause server B to process incorrect values for expected parts. This manipulation could lead to privilege escalation, particularly if the compromised part represents sensitive information such as usernames or user roles.
How To Fix
Minimum fixed version
4.3.19-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade libspring-java
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If immediate patching is not feasible, consider implementing input validation and sanitization on the server A side to ensure that any data sent to server B is properly checked and does not contain unexpected multipart content. Additionally, you can restrict the types of requests that server A can make to server B.
Conclusion
CVE-2018-1272 is a significant vulnerability in the libspring-java package that can lead to privilege escalation through multipart request manipulation. It is crucial to update to the fixed version to safeguard your applications. For those unable to update immediately, implementing workarounds can help mitigate potential risks.
See every vulnerability recorded for libspring-java →
FAQ
CVE-2018-1272 is a vulnerability in the Spring Framework that allows for privilege escalation through manipulated multipart requests.
Versions 5.0 prior to 5.0.5 and versions 4.3 prior to 4.3.15 are affected by this vulnerability.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
The CVSS score of this vulnerability is 7.5, indicating a high severity level.
If you cannot update the package right away, implement input validation and restrict the types of requests made to mitigate the risk.
Related vulnerabilities
Recent vulnerabilities recorded for libspring-java.