Privilege Escalation Vulnerability in Hibernate Validator Package
Summary
CVE-2017-7536: In Hibernate Validator 5.2.x before 5.2.5 final, 5.3.x, and 5.4.x, it was found that when the security manager's reflective permissions, which allows it to access the private members of the class, are granted to Hibernat... Affects libhibernate-validator-java across 2 version ranges.
< 4.3.3-4
>= a93f900f0f91bdfccf98a1825d7cfbd85b8a6c85, < 9a8ee4954d9d6596f0bd87fd66d51deac81724d1
Fixed in 4.3.3-4. 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
Hibernate Validator is a popular open-source library used for validating Java objects. It provides a framework for defining validation rules and ensures that the data adheres to these rules before processing. The library is widely utilized in Java applications to maintain data integrity and enforce business rules. However, certain versions of Hibernate Validator are susceptible to a privilege escalation vulnerability that can potentially allow unauthorized access to private member values.
Vulnerability Detail
In Hibernate Validator versions 5.2.x before 5.2.5 final, 5.3.x, and 5.4.x, a vulnerability exists due to the security manager's reflective permissions being granted to the library. This flaw allows calling code to access private members of the class without proper permissions. An attacker could exploit this vulnerability to validate an invalid instance and retrieve private member values via the ConstraintViolation#getInvalidValue() method. This could lead to unauthorized access to sensitive data, posing a significant security risk.
How To Fix
Minimum fixed version
4.3.3-4
This is the first release that contains the fix.
sudo apt-get install --only-upgrade libhibernate-validator-java
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If an immediate upgrade is not feasible, consider implementing a security manager policy that restricts reflective access to private members of classes used by Hibernate Validator. This can be done by configuring the security policy file to deny reflective permissions for the library, thereby mitigating the risk until an upgrade can be performed.
Conclusion
The privilege escalation vulnerability in Hibernate Validator poses a significant risk to applications using affected versions of the library. It is crucial to upgrade to a secure version to protect against unauthorized access to sensitive data. Implementing a security policy can serve as a temporary workaround until an upgrade is possible.
See every vulnerability recorded for libhibernate-validator-java →
FAQ
The CVSS score of this vulnerability is 7.0, indicating a high severity level.
The affected versions include Hibernate Validator 5.2.x before 5.2.5 final, 5.3.x, and 5.4.x.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By using the Vulert playground, you can check if your application is affected by this vulnerability without needing to sign up.
Exploitation of this vulnerability could lead to unauthorized access to sensitive data, allowing attackers to validate invalid instances and retrieve private member values.
Yes, you can implement a security manager policy that restricts reflective access to private members of classes used by Hibernate Validator as a temporary measure.
References
Related vulnerabilities
Recent vulnerabilities recorded for libhibernate-validator-java.