CVE-2026-28685: Kimai: API invoice endpoint missing customer-level access control (IDOR)
Summary
GET /api/invoices/{id} only checks the role-based viewinvoice permission but does not verify the requesting user has access to the invoice's customer. Any user with ROLETEAMLEAD (which grants viewinvoice) can read all invoices in the system, including those belonging to customers assigned to other teams.
Affected Code
src/API/InvoiceController.php line 92-101:
php #[IsGranted('viewinvoice')] // Role check only, no customer access check #[Route(methods: ['GET'], path: '/{id}', name: 'getinvoice', requirements: ['id' => '\d+'])] public function getAction(Invoice $invoice): Response { $view = new View($invoice, 200); $view->getContext()->setGroups(self::GROUPSENTITY); return $this->viewHandler->handle($view); // Returns ANY invoice by ID }
The web controller (src/Controller/InvoiceController.php line 304-307) correctly checks customer access:
php #[IsGranted('viewinvoice')] #[IsGranted(new Expression("isgranted('access', subject.getCustomer())"), 'invoice')] public function downloadAction(Invoice $invoice, ...): Response { ... }
The access attribute in CustomerVoter (line 71-87) verifies team membership, but this check is entirely missing from the API endpoint.
PoC
Tested against Kimai v2.50.0 (Docker: kimai/kimai2:apache).
Setup: - TeamA with CustomerA ("SecretCorp"), TeamB with CustomerB ("BobCorp") - Bob is a teamlead in TeamB only - An invoice exists for SecretCorp (TeamA)
bash Bob (TeamB) reads SecretCorp (TeamA) invoice curl -H "Authorization: Bearer BOBTOKEN" http://localhost:8888/api/invoices/1
Response (200 OK): json { "invoiceNumber": "INV-2026-001", "total": 15000.0, "currency": "USD", "customer": {"name": "SecretCorp", ...} }
Bob can also enumerate all invoices via GET /api/invoices — the list endpoint uses setCurrentUser() in the query but the single-item endpoint bypasses this entirely via Symfony ParamConverter.
Impact
Any teamlead can read all invoices across the system regardless of team assignment. Invoice data typically contains sensitive financial information (amounts, customer details, payment terms). In multi-team deployments this breaks the intended data isolation between teams.
Suggested Fix
Add the customer access check to the API endpoint, matching the web controller:
diff #[IsGranted('viewinvoice')] +#[IsGranted(new Expression("isgranted('access', subject.getCustomer())"), 'invoice')] #[Route(methods: ['GET'], path: '/{id}', name: 'getinvoice')] public function getAction(Invoice $invoice): Response
Other sources
Kimai is a web-based multi-user time-tracking application. Prior to version 2.51.0, "GET /api/invoices/{id}" only checks the role-based viewinvoice permission but does not verify the requesting user has access to the invoice's customer. Any user with ROLETEAMLEAD (which grants viewinvoice) can read all invoices in the system, including those belonging to customers assigned to other teams. This issue has been patched in version 2.51.0.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-28685?
CVE-2026-28685 is classified as a high-severity vulnerability due to improper access control that allows unauthorized access to sensitive invoice data.
How do I fix CVE-2026-28685?
To fix CVE-2026-28685, upgrade to remedy version 2.51.0 or later, which implements proper customer access checks.
What impact does CVE-2026-28685 have on affected systems?
CVE-2026-28685 allows users with 'ROLE_TEAMLEAD' to view all invoices, potentially exposing sensitive customer information.
Is CVE-2026-28685 present in earlier versions of the software?
Yes, CVE-2026-28685 affects all versions of kimai/kimai prior to 2.51.0.
Who is responsible for mitigating CVE-2026-28685?
It is the responsibility of system administrators and developers using kimai/kimai software to apply the necessary patches to mitigate CVE-2026-28685.