Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘 Packagist
Not in CISA KEV

CVE-2026-52825

CVE-2026-52825 is a security vulnerability in kimai/kimai. O3 Security confirms whether CVE-2026-52825 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

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

Published
Jul 14, 2026
Updated
Jul 14, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Jul 14, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
🐘kimai/kimai

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

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:

$builder->add('users', UserType::class, [
    'label' => 'add_user.label',
    'help' => 'team.add_user.help',
    'mapped' => false,
    'multiple' => false,
    'expanded' => false,
    'required' => false,
    'ignore_users' => $team !== null ? $team->getUsers() : []
]);

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

$query = new UserFormTypeQuery();
$query->setUser($options['user']);

$qb = $this->userRepository->getQueryBuilderForFormType($query);
$users = $qb->getQuery()->getResult();

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

if (null !== $user && $user->isTeamlead()) {
    $userIds = [];
    foreach ($user->getTeams() as $team) {
        if ($team->isTeamlead($user)) {
            foreach ($team->getUsers() as $teamMember) {
                $userIds[] = $teamMember->getId();
            }
        }
    }
    $userIds = array_unique($userIds);
    $qb->setParameter('teamMember', $userIds);
    $or->add($qb->expr()->in('u.id', ':teamMember'));
}

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

#[IsGranted('edit', 'team')]
#[Route(methods: ['POST'], path: '/{id}/members/{userId}', name: 'post_team_member', requirements: ['id' => '\d+', 'userId' => '\d+'])]
public function postMemberAction(Team $team, #[MapEntity(mapping: ['userId' => 'id'])] User $member): Response
{
    if ($member->isInTeam($team)) {
        throw new BadRequestHttpException('User is already member of the team');
    }

    $team->addUser($member);
    $this->teamService->saveTeam($team);
}

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

#[IsGranted('edit', 'team')]
#[Route(methods: ['POST'], path: '/{id}/activities/{activityId}', name: 'post_team_activity', requirements: ['id' => '\d+', 'activityId' => '\d+'])]
public function postActivityAction(Team $team, #[MapEntity(mapping: ['activityId' => 'id'])] Activity $activity, ActivityRepository $activityRepository): Response
{
    if ($team->hasActivity($activity)) {
        throw new BadRequestHttpException('Team has already access to activity');
    }

    $team->addActivity($activity);
    $activityRepository->saveActivity($activity);
}

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:

if (!$user->isAdmin() && !$user->isSuperAdmin() && !$user->isTeamleadOf($subject)) {
    return false;
}

return $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:

public function checkTeamAccessActivity(Activity $activity, User $user): bool
{
    if ($activity->getProject() !== null && !$this->checkTeamAccessProject($activity->getProject(), $user)) {
        return false;
    }

    return $this->checkTeamAccess($activity->getTeams(), $user);
}

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistkimai/kimaiall versions2.58.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for kimai/kimai. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update kimai/kimai to 2.58.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-52825 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether CVE-2026-52825 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to CVE-2026-52825. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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. #
O3 Security · Impact-Aware SCA

Is CVE-2026-52825 in your dependencies?

O3 detects CVE-2026-52825 across Packagist dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.