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

Kimai has Improper Authorization in Team Member and Team Activity Assignment APIs Which Allows Expansion of Team Scope Beyond Authorized Visibility

위협 신호 · CVSS · EPSS · KEV

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

이론적 심각도 점수

EPSS

예측 데이터 없음

KEV
미등재

실측 악용 기록 없음

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

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

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

CVSS 벡터 · 메트릭

CVSS 벡터 정보 없음

상세 설명

Summary

Kimai contains an authenticated improper authorization vulnerability in Team-related assignment APIs. A Teamlead who can edit their own team can use backend API endpoints to add users or activities that fall outside their intended visible or manageable scope, even when the frontend correctly hides those targets.

This affects both team member assignment and team activity assignment. The issue is caused by treating "may edit this team" as equivalent to "may attach any referenced object to this team", without performing a second authorization check on the target user or activity.

Details

The issue affects at least the following API routes:

  • POST /api/teams/{id}/members/{userId}
  • POST /api/teams/{id}/activities/{activityId}

In both cases, the backend checks whether the caller may edit the Team, but it does not verify whether the referenced User or Activity falls inside the caller's allowed management scope.

For team member assignment, the frontend form correctly limits the visible user choices. In src/Form/TeamEditForm.php, the team edit form uses UserType:

bash
1$builder->add('users', UserType::class, [
2 'label' => 'add_user.label',
3 'help' => 'team.add_user.help',
4 'mapped' => false,
5 'multiple' => false,
6 'expanded' => false,
7 'required' => false,
8 'ignore_users' => $team !== null ? $team->getUsers() : []
9]);

In src/Form/Type/UserType.php, the user selector is built from UserRepository::getQueryBuilderForFormType():

bash
1$query = new UserFormTypeQuery();
2$query->setUser($options['user']);
3
4$qb = $this->userRepository->getQueryBuilderForFormType($query);
5$users = $qb->getQuery()->getResult();

And in src/Repository/UserRepository.php, Teamlead-visible candidates are limited to team members from teams they lead:

bash
1if (null !== $user && $user->isTeamlead()) {
2 $userIds = [];
3 foreach ($user->getTeams() as $team) {
4 if ($team->isTeamlead($user)) {
5 foreach ($team->getUsers() as $teamMember) {
6 $userIds[] = $teamMember->getId();
7 }
8 }
9 }
10 $userIds = array_unique($userIds);
11 $qb->setParameter('teamMember', $userIds);
12 $or->add($qb->expr()->in('u.id', ':teamMember'));
13}

However, the actual member-assignment API does not reuse that restriction. In src/API/TeamController.php:

bash
1#[IsGranted('edit', 'team')]
2#[Route(methods: ['POST'], path: '/{id}/members/{userId}', name: 'post_team_member', requirements: ['id' => '\d+', 'userId' => '\d+'])]
3public function postMemberAction(Team $team, #[MapEntity(mapping: ['userId' => 'id'])] User $member): Response
4{
5 if ($member->isInTeam($team)) {
6 throw new BadRequestHttpException('User is already member of the team');
7 }
8
9 $team->addUser($member);
10 $this->teamService->saveTeam($team);
11}

For activity assignment, the same pattern appears. In src/API/TeamController.php:

bash
1#[IsGranted('edit', 'team')]
2#[Route(methods: ['POST'], path: '/{id}/activities/{activityId}', name: 'post_team_activity', requirements: ['id' => '\d+', 'activityId' => '\d+'])]
3public function postActivityAction(Team $team, #[MapEntity(mapping: ['activityId' => 'id'])] Activity $activity, ActivityRepository $activityRepository): Response
4{
5 if ($team->hasActivity($activity)) {
6 throw new BadRequestHttpException('Team has already access to activity');
7 }
8
9 $team->addActivity($activity);
10 $activityRepository->saveActivity($activity);
11}

The Team voter only checks whether the current user may edit that team, not whether the referenced object is within the Teamlead's legitimate scope. In src/Voter/TeamVoter.php:

bash
1if (!$user->isAdmin() && !$user->isSuperAdmin() && !$user->isTeamleadOf($subject)) {
2 return false;
3}
4
5return $this->permissionManager->hasRolePermission($user, $attribute . '_team');

For activities, this is especially risky because later authorization logic may trust the team assignment that was just written. In src/Security/RolePermissionManager.php:

bash
1public function checkTeamAccessActivity(Activity $activity, User $user): bool
2{
3 if ($activity->getProject() !== null && !$this->checkTeamAccessProject($activity->getProject(), $user)) {
4 return false;
5 }
6
7 return $this->checkTeamAccess($activity->getTeams(), $user);
8}

So once a Teamlead is able to write a new team/activity relation, later access-control decisions may treat that relation as legitimate input.

A PoC was provided, but removed for security reasons.

Impact

This vulnerability allows a Teamlead to use their own editable team as an expansion container for objects that should remain outside their authorized scope. In the validated member-assignment case, the attacker can forcibly add users who are not supposed to be manageable through that Teamlead's visible range. In the activity-assignment case, the attacker can attach activities that are outside the intended authorization boundary of the team.

Once such relations are written, downstream authorization, visibility, and business workflows may start treating them as legitimate. This can affect user scoping, team-based access control, customer/project/activity visibility, time-entry behavior, statistics, and reporting. The issue therefore breaks the trustworthiness of Team as a security isolation container.

Solution

Several new permission checks were added to src/API/TeamController.php -

  • Check if user can be accessed with #[IsGranted('access_user', 'member')] before adding as new team member
  • Check if customer can be seen with #[IsGranted('view', 'customer')] before a team is granted access to a customer
  • Check if project can be seen with #[IsGranted('view', 'project')] before a team is granted access to a project
  • Check if activity can be seen with #[IsGranted('view', 'activity')] before a team is granted access to an activity

See https://www.kimai.org/en/security/ghsa-xv4r-4885-gwpg for more information.

AI 심층 분석

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