Kestrel
대시보드로 돌아가기
CVE-2026-52819MEDIUMGHSA대응게시일: 2026. 07. 13.수정일: 2026. 07. 13.

Kimai: Teamlead authorization bypass in GET /api/timesheets allows reading other users' timesheet records without being teamlead of the target

위협 신호 · CVSS · EPSS · KEV

정기 패치· 높은 악용 신호 없음
CVSS
medium

이론적 심각도 점수

EPSS

예측 데이터 없음

KEV
미등재

실측 악용 기록 없음

권장 대응 기한60일 이내CISA SSVC 기준

계획된 패치 주기 내 조치(60일 이내)

외부 노출· KEV 미등재 · 자동화 어려움 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

CVSS 벡터 정보 없음

상세 설명

Summary

GET /api/timesheets?user=<id> (and users[]=<id>) returns the targeted user's timesheet records to any caller that has the view_other_timesheet permission, without verifying that the caller is teamlead of any team containing the target user. The per-record endpoint GET /api/timesheets/{id} correctly enforces this check via TimesheetVoter/RolePermissionManager::checkTeamAccessTimesheetcheckTeamLeadAccess, but the list endpoint only filters projects/customers by team membership and never validates t.user. A ROLE_TEAMLEAD user can therefore enumerate any user's records — including the rate field — as long as those records are on a project with no team scoping (Kimai's default) or on any project that shares any team (membership, not lead) with the requester.

Details

Root cause: authorization mismatch between the per-record voter and the list endpoint.

Per-record path (correct)

src/Voter/TimesheetVoter.php:138:

bash
1if (!$this->permissionManager->checkTeamAccessTimesheet($subject, $user)) {
2 return false;
3}
4return $this->permissionManager->hasRolePermission($user, $permission . '_other_timesheet');

checkTeamLeadAccess (RolePermissionManager.php:143-160) requires isTeamleadOf (not just member) one of the target user's teams. The unit test testTeamleadDeniedWhenOnlyPlainMemberOfOwnerTeam (tests/Voter/TimesheetVoterTest.php:253-269) codifies this:

"a TEAMLEAD role with view_other_timesheet must not access another user's timesheet by being a plain team member — they must be the team's teamlead."

List path (vulnerable)

src/API/TimesheetController.php:97-119:

bash
1public function cgetAction(ParamFetcherInterface $paramFetcher, ..., UserRepository $userRepository): Response
2{
3 $query = new TimesheetQuery(false);
4 $this->prepareQuery($query, $paramFetcher);
5 $seeAll = false;
6
7 if ($this->isGranted('view_other_timesheet')) {
8 /** @var array<int> $users */
9 $users = $paramFetcher->get('users');
10 $userId = $paramFetcher->get('user');
11
12 if ('all' === $userId) {
13 $seeAll = true;
14 } elseif (\is_string($userId) && $userId !== '') {
15 $users[] = (int) $userId;
16 }
17
18 if (!$seeAll) {
19 foreach ($userRepository->findByIds($users) as $user) {
20 $query->addUser($user); // <-- no teamlead-of-target check
21 }
22 }
23 }
24 ...

config/packages/kimai.yaml:96,115 grants TIMESHEET_OTHER (which contains view_other_timesheet) to ROLE_TEAMLEAD, so the gate at line 103 passes for any teamlead. The user= / users[]= IDs are pushed straight into the query.

Net effect

For any victim bob who:

  • has at least one team that the requester alice is not teamlead of (so the voter denies per-record access), AND
  • has timesheets either on a project with no team (Kimai's default), or on a project that shares any team with alice (membership, not lead)

alice is denied via GET /api/timesheets/{id} but receives bob's records via GET /api/timesheets?user=<bob_id>.

Disclosed fields in the collection response include description, begin, end, duration, billable, exported, tags, rate, internalRate, plus project/activity/user IDs (Default/Collection serializer groups, Timesheet.php:164-173). rate is financial data that the per-record voter is supposed to gate via the separate view_rate_other_timesheet permission.

Why other proposed mitigations don't apply

  • The view_other_timesheet IsGranted on the route is the only authorization layer in the list path; ROLE_TEAMLEAD has it globally.
  • prepareQuery only sets currentUser, not authorization (BaseApiController.php:68-71).
  • The serializer does not filter rate per caller — it is a static Default-group property.
  • Recent commit 20c7b03 "Re-usable ACL checks on teams" hardened the voter side but left the list endpoint unchanged.

A PoC was provided, but removed for security reasons.

Impact

  • Authorization bypass: a ROLE_TEAMLEAD (a non-admin role typically granted to multiple users in a Kimai instance) can read any other user's timesheet records
  • Financial data disclosure: the rate and internalRate fields are returned in the collection serializer group, leaking what gets billed/costed against any user's records.
  • PII / activity disclosure: per-entry description, begin, end, duration, billable, exported, project/activity/customer IDs, and tags are leaked, allowing reconstruction of any user's activity timeline.

Solution

The list of requested user TimesheetController::cgetAction() is now guarded with the access_user permission.
The access_user permission verifies that the requesting user is allowed to see each of the requested user.
If any of the requested users may not be seen, the entire call will fail.

Find out more at https://www.kimai.org/en/security/ghsa-4m8q-55qv-9pwp

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.