CVE-2026-28685: Kimai/kimai Kimai's API Invoice Endpoint Missing Vulnerability

MODERATE
Advisory Identifier: GHSA-v33r-r6h2-8wr7
CVSS 6.5
CWE-862 CWE-285
Published
Advisory Summary

CVE-2026-28685 is a MODERATE (CVSS 6.5) kimai's api invoice endpoint missing vulnerability (CWE-862: Missing Authorization) affecting Kimai/kimai libraries in the Packagist ecosystem. The issue involves kimai's api invoice endpoint missing customer-level access control (idor). Remediation is available by upgrading affected packages to version 2.51.0.

CVE-2026-28685 at a Glance

CVE Identifier CVE-2026-28685
GHSA Identifier GHSA-v33r-r6h2-8wr7
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-862: Missing Authorization
Affected Product Kimai/kimai
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-28685

To remediate this vulnerability, upgrade all affected Kimai/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.

kimai/kimai fixed: 2.51.0
Upgrade kimai/kimai to 2.51.0
Verify Direct and Transitive Dependencies

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-28685, inspect your project dependencies for Kimai/kimai:

inspect dependencies for kimai/kimai

Analyze the terminal output to locate any version of Kimai/kimai in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.51.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-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Kimai/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

## 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: ```php #[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: ```php #[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) ```bash # Bob (TeamB) reads SecretCorp (TeamA) invoice curl -H "Authorization: Bearer BOB_TOKEN" 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('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 ```

CVE-2026-28685 Affected Kimai/kimai Versions

1 component(s)
Fixed Versions:
2.51.0
Product / Package Ecosystem Affected Versions Fixed Version
kimai/kimai
Packagist
< 2.51.0
2.51.0

References

Frequently Asked Questions

What is CVE-2026-28685?
CVE-2026-28685 is a security vulnerability in Kimai/kimai involving Kimai's API invoice endpoint missing customer-level access control (IDOR) under CWE-862: Missing Authorization.
Which Kimai/kimai versions are affected?
Affected versions include releases prior to 2.51.0 across affected packages: kimai/kimai.
What version fixes CVE-2026-28685?
Upgrading to 2.51.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is kimai/kimai affected?
Yes, kimai/kimai is affected in releases prior to 2.51.0. Upgrade your dependency to 2.51.0 or later.
What is the CVSS score of CVE-2026-28685?
CVE-2026-28685 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-28685?
CVE-2026-28685 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Packagist dependencies for CVE-2026-28685?
Run the dependency tree command: 'inspect dependencies for kimai/kimai'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v33r-r6h2-8wr7",
  "modified" : "2026-03-06T15:17:08Z",
  "published" : "2026-03-04T20:43:17Z",
  "aliases" : [ "CVE-2026-28685" ],
  "summary" : "Kimai's API invoice endpoint missing customer-level access control (IDOR)",
  "details" : "## Summary\n\n`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.\n\n## Affected Code\n\n`src/API/InvoiceController.php` line 92-101:\n\n```php\n#[IsGranted('view_invoice')]           // Role check only, no customer access check\n#[Route(methods: ['GET'], path: '/{id}', name: 'get_invoice', requirements: ['id' => '\\d+'])]\npublic function getAction(Invoice $invoice): Response\n{\n    $view = new View($invoice, 200);\n    $view->getContext()->setGroups(self::GROUPS_ENTITY);\n    return $this->viewHandler->handle($view);  // Returns ANY invoice by ID\n}\n```\n\nThe web controller (`src/Controller/InvoiceController.php` line 304-307) correctly checks customer access:\n\n```php\n#[IsGranted('view_invoice')]\n#[IsGranted(new Expression(\"is_granted('access', subject.getCustomer())\"), 'invoice')]\npublic function downloadAction(Invoice $invoice, ...): Response { ... }\n```\n\nThe `access` attribute in `CustomerVoter` (line 71-87) verifies team membership, but this check is entirely missing from the API endpoint.\n\n## PoC\n\nTested against Kimai v2.50.0 (Docker: `kimai/kimai2:apache`).\n\nSetup:\n- TeamA with CustomerA (\"SecretCorp\"), TeamB with CustomerB (\"BobCorp\")\n- Bob is a teamlead in TeamB only\n- An invoice exists for SecretCorp (TeamA)\n\n```bash\n# Bob (TeamB) reads SecretCorp (TeamA) invoice\ncurl -H \"Authorization: Bearer BOB_TOKEN\" http://localhost:8888/api/invoices/1\n```\n\nResponse (200 OK):\n```json\n{\n  \"invoiceNumber\": \"INV-2026-001\",\n  \"total\": 15000.0,\n  \"currency\": \"USD\",\n  \"customer\": {\"name\": \"SecretCorp\", ...}\n}\n```\n\nBob 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.\n\n## Impact\n\nAny 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.\n\n## Suggested Fix\n\nAdd the customer access check to the API endpoint, matching the web controller:\n\n```diff\n #[IsGranted('view_invoice')]\n+#[IsGranted(new Expression(\"is_granted('access', subject.getCustomer())\"), 'invoice')]\n #[Route(methods: ['GET'], path: '/{id}', name: 'get_invoice')]\n public function getAction(Invoice $invoice): Response\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "kimai/kimai"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.51.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.50.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/kimai/kimai/security/advisories/GHSA-v33r-r6h2-8wr7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-28685"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kimai/kimai/commit/a0601c8cb28fed1cca19051a8272425069ab758f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kimai/kimai"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kimai/kimai/releases/tag/2.51.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285", "CWE-862" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-04T20:43:17Z",
    "nvd_published_at" : "2026-03-06T05:16:38Z"
  }
}