GHSA-j5mc-p8qg-39j7: Kimai/kimai Kimai Favorite Timesheet Add And Vulnerability

LOW
CWE-639 CWE-862
Published
Advisory Summary

GHSA-j5mc-p8qg-39j7 is a LOW kimai favorite timesheet add and vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting Kimai/kimai libraries in the Packagist ecosystem. The issue involves kimai favorite timesheet add and remove endpoints allows cross-user bookmark manipulation. Remediation is available by upgrading affected packages to version 2.57.0.

GHSA-j5mc-p8qg-39j7 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-j5mc-p8qg-39j7
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product Kimai/kimai
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix GHSA-j5mc-p8qg-39j7

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.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 GHSA-j5mc-p8qg-39j7, 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.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/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 / IDOR vulnerability in the favorite timesheet add and remove endpoints. A low-privileged user who knows another user's `timesheet.id` can add that record to, or remove it from, the victim's `favorite/recent` bookmark list. This allows cross-user manipulation of per-user favorite state without administrative privileges. ### Details The issue affects the following routes: - `GET /en/favorite/timesheet/add/{id}` - `GET /en/favorite/timesheet/remove/{id}` Both endpoints accept a user-controlled timesheet identifier and only require the caller to hold the generic `start_own_timesheet` permission. They do not verify that the referenced `Timesheet` object belongs to the currently authenticated user. - In `src/Controller/FavoriteController.php`, the controller methods accept a `Timesheet` object directly and forward it to the favorite service. - The root cause becomes more obvious in `src/Timesheet/FavoriteRecordService.php`. The bookmark owner is derived from `$timesheet->getUser()` instead of the current session user. - Because of this design, any authenticated user who can reference another user's timesheet ID can modify the victim's `favorite/recent` bookmark data. *A PoC was provided, but removed for security reasons.* ### Impact This vulnerability allows any authenticated low-privileged user to manipulate another user's favorite bookmark state across accounts. An attacker can inject arbitrary victim-owned timesheet entries into the victim's quick-entry workflow, remove existing favorites, and repeatedly disturb the victim's normal timesheet usage without needing administrative privileges. The issue does not directly disclose sensitive data, but it is a real cross-user business-state tampering vulnerability with clear integrity impact. Because the add and remove endpoints can be combined, an attacker can reliably insert, remove, and reorder entries in another user's `favorite/recent` list.

GHSA-j5mc-p8qg-39j7 Affected Kimai/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 GHSA-j5mc-p8qg-39j7?
GHSA-j5mc-p8qg-39j7 is a security vulnerability in Kimai/kimai involving Kimai Favorite Timesheet Add and Remove Endpoints Allows Cross-User Bookmark Manipulation under CWE-639: Authorization Bypass Through User-Controlled Key.
Which Kimai/kimai versions are affected?
Affected versions include releases prior to 2.57.0 across affected packages: kimai/kimai.
What version fixes GHSA-j5mc-p8qg-39j7?
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 GHSA-j5mc-p8qg-39j7?
GHSA-j5mc-p8qg-39j7 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 GHSA-j5mc-p8qg-39j7?
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-j5mc-p8qg-39j7",
  "modified" : "2026-07-02T20:44:05Z",
  "published" : "2026-07-02T20:44:05Z",
  "aliases" : [ ],
  "summary" : "Kimai Favorite Timesheet Add and Remove Endpoints Allows Cross-User Bookmark Manipulation",
  "details" : "### Summary\n\nKimai 2.56.0 contains an authenticated improper authorization / IDOR vulnerability in the favorite timesheet add and remove endpoints. A low-privileged user who knows another user's `timesheet.id` can add that record to, or remove it from, the victim's `favorite/recent` bookmark list. This allows cross-user manipulation of per-user favorite state without administrative privileges.\n\n### Details\n\nThe issue affects the following routes:\n\n- `GET /en/favorite/timesheet/add/{id}`\n- `GET /en/favorite/timesheet/remove/{id}`\n\nBoth endpoints accept a user-controlled timesheet identifier and only require the caller to hold the generic `start_own_timesheet` permission. They do not verify that the referenced `Timesheet` object belongs to the currently authenticated user.\n\n- In `src/Controller/FavoriteController.php`, the controller methods accept a `Timesheet` object directly and forward it to the favorite service. \n- The root cause becomes more obvious in `src/Timesheet/FavoriteRecordService.php`. The bookmark owner is derived from `$timesheet->getUser()` instead of the current session user.\n- Because of this design, any authenticated user who can reference another user's timesheet ID can modify the victim's `favorite/recent` bookmark data.\n\n*A PoC was provided, but removed for security reasons.*\n\n### Impact\n\nThis vulnerability allows any authenticated low-privileged user to manipulate another user's favorite bookmark state across accounts. An attacker can inject arbitrary victim-owned timesheet entries into the victim's quick-entry workflow, remove existing favorites, and repeatedly disturb the victim's normal timesheet usage without needing administrative privileges.\n\nThe issue does not directly disclose sensitive data, but it is a real cross-user business-state tampering vulnerability with clear integrity impact. Because the add and remove endpoints can be combined, an attacker can reliably insert, remove, and reorder entries in another user's `favorite/recent` list.",
  "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/E:U"
  } ],
  "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-j5mc-p8qg-39j7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kimai/kimai"
  }, {
    "type" : "WEB",
    "url" : "https://www.kimai.org/en/security/ghsa-j5mc-p8qg-39j7"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-639", "CWE-862" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-02T20:44:05Z",
    "nvd_published_at" : null
  }
}