CVE-2026-52819: Kimai Teamlead Authorization Bypass Vulnerability
MODERATECVE-2026-52819 is a MODERATE teamlead authorization bypass vulnerability (CWE-863: Incorrect Authorization) affecting Kimai libraries in the Packagist ecosystem. The issue involves teamlead authorization bypass in get /api/timesheets allows reading other users' timesheet records without being teamlead of the target. Remediation is available by upgrading affected packages to version 2.57.0.
CVE-2026-52819 at a Glance
How to Fix CVE-2026-52819
To remediate this vulnerability, upgrade all affected Kimai dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade kimai/kimai to 2.57.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for kimai/kimai
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-52819, inspect your project dependencies for Kimai:
inspect dependencies for kimai/kimai
Analyze the terminal output to locate any version of Kimai in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.57.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Kimai, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-52819 Affected Kimai Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
kimai/kimai
|
Packagist |
< 2.57.0
|
2.57.0
|
References
Frequently Asked Questions
What is CVE-2026-52819?
Which Kimai versions are affected?
What version fixes CVE-2026-52819?
Is kimai/kimai affected?
What CWE is associated with CVE-2026-52819?
How can I check Packagist dependencies for CVE-2026-52819?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4m8q-55qv-9pwp",
"modified" : "2026-07-13T23:55:16Z",
"published" : "2026-07-13T23:55:16Z",
"aliases" : [ "CVE-2026-52819" ],
"summary" : "Kimai: Teamlead authorization bypass in GET /api/timesheets allows reading other users' timesheet records without being teamlead of the target",
"details" : "## Summary\n\n`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::checkTeamAccessTimesheet` → `checkTeamLeadAccess`, 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.\n\n## Details\n\n**Root cause:** authorization mismatch between the per-record voter and the list endpoint.\n\n### Per-record path (correct)\n\n`src/Voter/TimesheetVoter.php:138`:\n```php\nif (!$this->permissionManager->checkTeamAccessTimesheet($subject, $user)) {\n return false;\n}\nreturn $this->permissionManager->hasRolePermission($user, $permission . '_other_timesheet');\n```\n\n`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:\n\n> *\"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.\"*\n\n### List path (vulnerable)\n\n`src/API/TimesheetController.php:97-119`:\n```php\npublic function cgetAction(ParamFetcherInterface $paramFetcher, ..., UserRepository $userRepository): Response\n{\n $query = new TimesheetQuery(false);\n $this->prepareQuery($query, $paramFetcher);\n $seeAll = false;\n\n if ($this->isGranted('view_other_timesheet')) {\n /** @var array<int> $users */\n $users = $paramFetcher->get('users');\n $userId = $paramFetcher->get('user');\n\n if ('all' === $userId) {\n $seeAll = true;\n } elseif (\\is_string($userId) && $userId !== '') {\n $users[] = (int) $userId;\n }\n\n if (!$seeAll) {\n foreach ($userRepository->findByIds($users) as $user) {\n $query->addUser($user); // <-- no teamlead-of-target check\n }\n }\n }\n ...\n```\n\n`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.\n\n### Net effect\n\nFor any victim `bob` who:\n- has at least one team that the requester `alice` is **not** teamlead of (so the voter denies per-record access), AND\n- 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)\n\n`alice` is denied via `GET /api/timesheets/{id}` but receives `bob`'s records via `GET /api/timesheets?user=<bob_id>`.\n\nDisclosed 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.\n\n### Why other proposed mitigations don't apply\n- The `view_other_timesheet` `IsGranted` on the route is the only authorization layer in the list path; ROLE_TEAMLEAD has it globally.\n- `prepareQuery` only sets `currentUser`, not authorization (BaseApiController.php:68-71).\n- The serializer does not filter `rate` per caller — it is a static `Default`-group property.\n- Recent commit 20c7b03 \"Re-usable ACL checks on teams\" hardened the voter side but left the list endpoint unchanged.\n\n*A PoC was provided, but removed for security reasons.*\n\n## Impact\n\n- **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\n- **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.\n- **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.\n\n# Solution\n\nThe list of requested user `TimesheetController::cgetAction()` is now guarded with the `access_user` permission.\nThe `access_user` permission verifies that the requesting user is allowed to see each of the requested user.\nIf any of the requested users may not be seen, the entire call will fail.\n\nFind out more at [https://www.kimai.org/en/security/ghsa-4m8q-55qv-9pwp](https://www.kimai.org/en/security/ghsa-4m8q-55qv-9pwp)",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "kimai/kimai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.57.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.56.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/kimai/kimai/security/advisories/GHSA-4m8q-55qv-9pwp"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kimai/kimai"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-13T23:55:16Z",
"nvd_published_at" : null
}
}