CVE-2026-52821: Kimai Improper Authorization Through Activity Creation Vulnerability

MODERATE
Advisory Identifier: GHSA-3q6q-26vg-v97x
CWE-639 CWE-862
Published
Advisory Summary

CVE-2026-52821 is a MODERATE improper authorization through activity creation vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting Kimai libraries in the Packagist ecosystem. The issue involves improper authorization through activity creation with preset project allows creation under unauthorized projects. Remediation is available by upgrading affected packages to version 2.57.0.

CVE-2026-52821 at a Glance

CVE Identifier CVE-2026-52821
GHSA Identifier GHSA-3q6q-26vg-v97x
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product Kimai
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-52821

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.

kimai/kimai fixed: 2.57.0
Upgrade kimai/kimai to 2.57.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-52821, 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-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. 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

### Summary Kimai 2.56.0 contains an authenticated improper authorization vulnerability in the preset-project activity creation flow. A user with the generic `create_activity` permission, but without access to a target project, can still create a new `Activity` under that unauthorized project by visiting the preset project creation route directly. This is a persistent cross-project business-object creation issue. The attacker does not need permission to view or edit the target project and only needs to know a valid `project.id`. ### Details The issue affects the activity creation entry point that accepts a preset project identifier: - `GET/POST /en/admin/activity/create/{project}` - `GET/POST /en/admin/project/create/{customer}` In `src/Controller/ActivityController.php`, the controller checks only the global capability to create activities and does not verify whether the current user is allowed to create an activity under the supplied `Project` object. The form and repository path also preserve the preset project instead of rejecting it when the user lacks access. Because the preset project is merged into the candidate set, the final save operation can persist a new `Activity` under a project that is outside the attacker's authorized project scope. The same logic applies to the `src/Controller/ProjectController.php`. *A PoC was provided, but removed for security reasons.* ### Impact This vulnerability allows an authenticated user to inject new child business objects into projects outside their authorized scope. An attacker can pollute another team's project configuration, influence later timesheet selection and rate inheritance, and create conditions for downstream business abuse if other users start using the injected activity. # Solution - In `ActivityController` we now validate if the project can be edited with `[IsGranted('edit', 'project')]` - In `ProjectController` we now validate if if the customer can be edited with `[IsGranted('edit', 'customer')]` See https://www.kimai.org/en/security/ghsa-3q6q-26vg-v97x

CVE-2026-52821 Affected Kimai Versions

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

References

Frequently Asked Questions

What is CVE-2026-52821?
CVE-2026-52821 is a security vulnerability in Kimai involving Improper Authorization Through Activity Creation with Preset Project Allows Creation Under Unauthorized Projects under CWE-639: Authorization Bypass Through User-Controlled Key.
Which Kimai versions are affected?
Affected versions include releases prior to 2.57.0 across affected packages: kimai/kimai.
What version fixes CVE-2026-52821?
Upgrading to 2.57.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.57.0. Upgrade your dependency to 2.57.0 or later.
What CWE is associated with CVE-2026-52821?
CVE-2026-52821 is classified under CWE-639: Authorization Bypass Through User-Controlled Key (The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.).
How can I check Packagist dependencies for CVE-2026-52821?
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-3q6q-26vg-v97x",
  "modified" : "2026-07-14T00:03:42Z",
  "published" : "2026-07-14T00:03:42Z",
  "aliases" : [ "CVE-2026-52821" ],
  "summary" : "Kimai: Improper Authorization Through Activity Creation with Preset Project Allows Creation Under Unauthorized Projects",
  "details" : "### Summary\n\nKimai 2.56.0 contains an authenticated improper authorization vulnerability in the preset-project activity creation flow. A user with the generic `create_activity` permission, but without access to a target project, can still create a new `Activity` under that unauthorized project by visiting the preset project creation route directly.\n\nThis is a persistent cross-project business-object creation issue. The attacker does not need permission to view or edit the target project and only needs to know a valid `project.id`.\n\n### Details\n\nThe issue affects the activity creation entry point that accepts a preset project identifier:\n\n- `GET/POST /en/admin/activity/create/{project}`\n- `GET/POST /en/admin/project/create/{customer}`\n\nIn `src/Controller/ActivityController.php`, the controller checks only the global capability to create activities and does not verify whether the current user is allowed to create an activity under the supplied `Project` object.\n\nThe form and repository path also preserve the preset project instead of rejecting it when the user lacks access.  Because the preset project is merged into the candidate set, the final save operation can persist a new `Activity` under a project that is outside the attacker's authorized project scope.\n\nThe same logic applies to the `src/Controller/ProjectController.php`.\n\n*A PoC was provided, but removed for security reasons.*\n\n### Impact\n\nThis vulnerability allows an authenticated user to inject new child business objects into projects outside their authorized scope. An attacker can pollute another team's project configuration, influence later timesheet selection and rate inheritance, and create conditions for downstream business abuse if other users start using the injected activity.\n\n# Solution\n\n- In `ActivityController` we now validate if the project can be edited with `[IsGranted('edit', 'project')]`\n- In `ProjectController` we now validate if if the customer can be edited with `[IsGranted('edit', 'customer')]`\n\nSee https://www.kimai.org/en/security/ghsa-3q6q-26vg-v97x",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/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-3q6q-26vg-v97x"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kimai/kimai"
  }, {
    "type" : "WEB",
    "url" : "https://www.kimai.org/en/security/ghsa-3q6q-26vg-v97x"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-639", "CWE-862" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-14T00:03:42Z",
    "nvd_published_at" : null
  }
}