Summary
GET /api/invoices/{id} only checks the role-based view_invoice permission but does not verify the requesting user has access to the invoice's customer. Any user with ROLE_TEAMLEAD (which grants view_invoice) 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:
#[IsGranted('view_invoice')] // Role check only, no customer access check
#[Route(methods: ['GET'], path: '/{id}', name: 'get_invoice', requirements: ['id' => '\d+'])]
public function getAction(Invoice $invoice): Response
{
$view = new View($invoice, 200);
$view->getContext()->setGroups(self::GROUPS_ENTITY);
return $this->viewHandler->handle($view); // Returns ANY invoice by ID
}
The web controller (src/Controller/InvoiceController.php line 304-307) correctly checks customer access:
#[IsGranted('view_invoice')]
#[IsGranted(new Expression("is_granted('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)
# Bob (TeamB) reads SecretCorp (TeamA) invoice
curl -H "Authorization: Bearer BOB_TOKEN" http://localhost:8888/api/invoices/1
Response (200 OK):
{
"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.
The application does not perform an authorization check before performing a sensitive operation. Typical impact: unauthorized access to restricted functionality or data.
CVE-2026-28685 has a CVSS score of 6.5 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.51.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Add the customer access check to the API endpoint, matching the web controller:
#[IsGranted('view_invoice')]
+#[IsGranted(new Expression("is_granted('access', subject.getCustomer())"), 'invoice')]
#[Route(methods: ['GET'], path: '/{id}', name: 'get_invoice')]
public function getAction(Invoice $invoice): Response
Frequently Asked Questions
- What is CVE-2026-28685? CVE-2026-28685 is a medium-severity missing authorization vulnerability in kimai/kimai (composer), affecting versions <= 2.50.0. It is fixed in 2.51.0. The application does not perform an authorization check before performing a sensitive operation.
- How severe is CVE-2026-28685? CVE-2026-28685 has a CVSS score of 6.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of kimai/kimai are affected by CVE-2026-28685? kimai/kimai (composer) versions <= 2.50.0 is affected.
- Is there a fix for CVE-2026-28685? Yes. CVE-2026-28685 is fixed in 2.51.0. Upgrade to this version or later.
- Is CVE-2026-28685 exploitable, and should I be worried? Whether CVE-2026-28685 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-28685 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-28685? Upgrade
kimai/kimaito 2.51.0 or later.