CVE-2017-7536: High severity redhat Hibernate Validator vulnerability
A vulnerability which allows for a potential privilege escalation was found in the Hibernate Validator. If a security manager is present and HV itself is allowed to access private members reflectively as per the SM's configuration, that'll allow calling code without that permission to get hold of private state. The attack vector is to declare a constraint on a private member using XML, validate an invalid instance of that type and access the private member value via ConstraintViolation#getInvalidValue().
Other sources
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 Hibernate Validator, a potential privilege escalation can occur. By allowing the calling code to access those private members without the permission an attacker may be able to validate an invalid instance and access the private member value via ConstraintViolation#getInvalidValue().
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/hibernate-validatorto a version that resolves this vulnerability.Fixed in 4.3.4. - Upgrade
Upgrade
redhat/hibernate-validatorto a version that resolves this vulnerability.Fixed in 5.3.5. - Upgrade
Upgrade
Hibernate Validatorto a version that resolves this vulnerability.Fixed in 5.2.5 final - Upgrade
Upgrade
Hibernate Validatorto a version that resolves this vulnerability.Fixed in 5.3.x - Upgrade
Upgrade
Hibernate Validatorto a version that resolves this vulnerability.Fixed in 5.4.x - Compensating control
If a Security Manager is present, ensure Hibernate Validator is not granted reflective permissions that allow it to access private members of its classes (i.e., do not grant HV the SecurityManager configuration permissions described as allowing it to access private members reflectively).
Event History
Frequently Asked Questions
What is the severity of CVE-2017-7536?
CVE-2017-7536 is classified as a potential privilege escalation vulnerability.
How do I fix CVE-2017-7536?
To mitigate CVE-2017-7536, update Hibernate Validator to version 5.3.6 or later.
Which versions of Hibernate Validator are affected by CVE-2017-7536?
Hibernate Validator versions prior to 5.3.6 and 4.3.4 are affected by CVE-2017-7536.
Is CVE-2017-7536 relevant to Red Hat products?
Yes, CVE-2017-7536 affects multiple Red Hat products that utilize vulnerable versions of Hibernate Validator.
Can CVE-2017-7536 be exploited without a security manager?
No, CVE-2017-7536 requires a security manager configured to allow reflective access to private members.