Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-cj3c-5xpm-cx94
No affected components available
Summary
The permission view_other_timesheet performs differently for the Kimai UI and the API, thus returning unexpected data through the API.
Details
When setting the view_other_timesheet permission to true, on the frontend, users can only see timesheet entries for teams they are a part of. When requesting all timesheets from the API, however, all timesheet entries are returned, regardless of whether the user shares team permissions or not.
Example:
There are projects P1 and P2, Teams T1 and T2, users U1 and U2 and Timesheet entries E1 and E2. U1 is team leader of team T1 and has access to P1. U2 is in Team T2 and has access to both P1 and P2. U2 creates E1 for P1 and E2 for P2.
In the UI, U1 with view _other_timesheet perms sees E1 as he is a part of T1 that has access to P1.
In the API, however, he has access to E1 and E2.
Additionally, if U1 is not a team leader T1, he does not see any timesheet from a user other than himself in the UI, but still all timesheets in the API.
PoC
- Give a user
view_other_timesheetpermission - The result of the UI and the API call to
/api/timesheets?user=alldiffers in the data that is being returned
Curl command:
curl -X 'GET' \
'https://kimai.instance.com/api/timesheets?user=all' \
-H 'accept: application/json' \
-H 'X-AUTH-USER: username' \
-H 'X-AUTH-TOKEN: api_token'
Impact
This is at least an insufficient granularity of access control weakness. People can see timesheet entries they are not supposed to. This greatly affects the confidentiality of timesheet entries.
Restricting API access to administrators is also not a valid solution, as API access is needed, for example, to use the mobile app.
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker needs basic access or low-level privileges. The attacker needs the user to perform some action, like clicking a link. The vulnerability can affect other systems as well, not just the initial system. There is a high impact on the confidentiality of the information.
Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard