Kimai: Pre-2FA KIMAI_SESSION cookie grants full authenticated REST API access, bypassing TOTP
High severity. Published 14 July 2026. Update kimai/kimai to 2.59.0 or later: composer update kimai/kimai.
Which versions are affected?
| Package | Affected versions | Fixed in |
|---|---|---|
| kimai/kimai (opens in a new tab) | < 2.59.0 | 2.59.0 |
What should you do?
Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:
composer show kimai/kimai
composer auditAdvisory details
| Severity | High |
|---|---|
| Published | |
| Updated | |
| CVE | CVE-2026-52827 (opens in a new tab) |
| GHSA | GHSA-v8hx-4vx8-wc96 (opens in a new tab) |
| Weakness | CWE-287 |
What the advisory says
Summary Two-factor authentication (TOTP) can be fully bypassed for the REST API. The KIMAISESSION cookie returned in the response to the login request; issued after only the password is verified, before the TOTP step; is already accepted as authenticated by every /api/ endpoint.
So after submitting just the password, the web UI correctly holds the browser at the TOTP screen (/en/auth/2fa), but the cookie from that same login response can be replayed against the API to act as the user without ever entering the second factor. This affects any account with 2FA enabled and requires only the account password.
Details
Affected Component - The API firewall / authorization.
Source: GHSA-v8hx-4vx8-wc96 (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .
Other recent advisories for this package
- Kimai has Improper Authorization in Team Member and Team Activity Assignment APIs Which Allows Expansion of Team Scope Beyond Authorized Visibility (opens in a new tab) (medium, 14 July 2026)
- Kimai: ExportTemplate CRUD Missing Authorization Check Allows Unauthorized TEAMLEAD Access (opens in a new tab) (medium, 14 July 2026)
- Kimai: Login CSRF in the Timesheet Stop and Restart API Endpoints Allows Unauthorized State Changes (opens in a new tab) (medium, 14 July 2026)
- Kimai: Default APP_SECRET in Docker Image Enables Cookie Forgery and Account Takeover (critical, 14 July 2026)
- Improper Authorization in Kimai Timesheet Restart and Duplicate Allows New Timesheets After Project Access Revocation (opens in a new tab) (medium, 14 July 2026)