Kimai: Pre-2FA KIMAI_SESSION cookie grants full authenticated REST API access, bypassing TOTP (CVE-2026-52827)
Kimai versions prior to 2.59.0 have a vulnerability where the KIMAI_SESSION cookie issued after password verification but before completing two-factor authentication (2FA) grants full authenticated REST API access, effectively bypassing the TOTP second factor. This allows an attacker who knows the user's password to access the API without the second factor. The issue arises because the API firewall accepts the session cookie as authenticated before 2FA is completed. The vulnerability is fixed by requiring a higher authentication level after 2FA and updating the API authorization checks.
AI Analysis
Technical Summary
In Kimai versions before 2.59.0, the REST API firewall accepts the KIMAI_SESSION cookie issued immediately after password verification, before the TOTP 2FA step is completed, as fully authenticated. This allows bypassing 2FA for API access by replaying the session cookie obtained after login but before 2FA. The root cause is that the API firewall uses the IS_AUTHENTICATED role, which is granted before 2FA completion, and the API voter does not check if 2FA is in progress. The fix changes the API firewall to require IS_AUTHENTICATED_REMEMBERED, assigned only after 2FA, and updates the API voter to deny access during the 2FA step.
Potential Impact
Two-factor authentication protection is completely bypassed for the REST API. An attacker who obtains a user's password can gain full authenticated API access without needing the second factor. This undermines the security benefits of 2FA for API endpoints. No additional tokens or CSRF tokens are required; only the session cookie from the login response is needed. This increases the risk of account compromise via phishing, credential stuffing, or password reuse attacks.
Mitigation Recommendations
A fix is available in Kimai version 2.59.0 and later. The API firewall now requires IS_AUTHENTICATED_REMEMBERED, which is only granted after successful 2FA completion. The API authorization logic has been updated to deny access if the user is currently in the 2FA step. Users and administrators should upgrade to version 2.59.0 or later to remediate this vulnerability. No additional mitigations are required once patched.
Kimai: Pre-2FA KIMAI_SESSION cookie grants full authenticated REST API access, bypassing TOTP (CVE-2026-52827)
Description
Kimai versions prior to 2.59.0 have a vulnerability where the KIMAI_SESSION cookie issued after password verification but before completing two-factor authentication (2FA) grants full authenticated REST API access, effectively bypassing the TOTP second factor. This allows an attacker who knows the user's password to access the API without the second factor. The issue arises because the API firewall accepts the session cookie as authenticated before 2FA is completed. The vulnerability is fixed by requiring a higher authentication level after 2FA and updating the API authorization checks.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
In Kimai versions before 2.59.0, the REST API firewall accepts the KIMAI_SESSION cookie issued immediately after password verification, before the TOTP 2FA step is completed, as fully authenticated. This allows bypassing 2FA for API access by replaying the session cookie obtained after login but before 2FA. The root cause is that the API firewall uses the IS_AUTHENTICATED role, which is granted before 2FA completion, and the API voter does not check if 2FA is in progress. The fix changes the API firewall to require IS_AUTHENTICATED_REMEMBERED, assigned only after 2FA, and updates the API voter to deny access during the 2FA step.
Potential Impact
Two-factor authentication protection is completely bypassed for the REST API. An attacker who obtains a user's password can gain full authenticated API access without needing the second factor. This undermines the security benefits of 2FA for API endpoints. No additional tokens or CSRF tokens are required; only the session cookie from the login response is needed. This increases the risk of account compromise via phishing, credential stuffing, or password reuse attacks.
Mitigation Recommendations
A fix is available in Kimai version 2.59.0 and later. The API firewall now requires IS_AUTHENTICATED_REMEMBERED, which is only granted after successful 2FA completion. The API authorization logic has been updated to deny access if the user is currently in the 2FA step. Users and administrators should upgrade to version 2.59.0 or later to remediate this vulnerability. No additional mitigations are required once patched.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-v8hx-4vx8-wc96
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-52827"]
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a55ff7f68715ace432f3e0c
Added to database: 07/14/2026, 09:21:03 UTC
Last enriched: 07/14/2026, 09:41:07 UTC
Last updated: 07/31/2026, 12:27:30 UTC
Views: 13
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.