Critical Flaw in Kimai Docker Image Allows Account Takeover

Users of the Kimai time-tracking application are urged to update their installations immediately due to a critical security vulnerability identified in the official Docker image. This flaw, designated as CVE-2026-52824, affects Kimai versions up to 2.57.0 and has been addressed in version 2.58.0.

Kimai is an open-source time-tracking tool widely utilized by businesses and teams, often deployed via Docker containers for ease of use. The vulnerability arises from the Docker image’s default configuration, which sets the `APP_SECRET` environment variable to a publicly known placeholder value: “change_this_to_something_unique.” This default was intended to be replaced during deployment; however, the Docker startup process did not enforce or automatically generate a unique secret.

The `APP_SECRET` serves as Symfony’s kernel secret, a cryptographic key essential for creating and validating HMAC-signed security tokens. If an installation continues to use the default secret, an attacker can exploit this known key to forge tokens that the application might accept as legitimate.

Potential Impact

Exploitation of this vulnerability could allow unauthenticated attackers to forge several security-sensitive tokens, including remember-me cookies, login link signatures, password reset URLs, and CSRF tokens. This means an attacker with network access to a vulnerable Kimai instance could impersonate any user, including super administrators, without needing valid credentials.

Kimai user IDs are sequential integers starting at 111, making them relatively predictable. The first super administrator account is often assigned ID 111, making these privileged accounts particularly vulnerable. While enabling two-factor authentication (2FA) can mitigate the risk, accounts without active 2FA could be entirely compromised.

Mitigation and Recommendations

To address this issue, Kimai version 2.58.0 modifies the Docker initialization process to prevent insecure setups. The updated entrypoint generates a random `APP_SECRET` using `bin2hex(random_bytes(32))` if an administrator has not supplied one. The generated secret is stored in `/opt/kimai/var/data/.appsecret`, and the deployment configuration is written to `/opt/kimai/.env.local`.

Users are strongly advised to update to Kimai version 2.58.0 or newer to secure their installations. Additionally, administrators should ensure that a unique, randomly generated `APP_SECRET` is set during deployment to prevent similar vulnerabilities in the future.

This incident underscores the importance of reviewing default configurations in software deployments, especially when using containerized applications. Default settings intended for convenience can inadvertently introduce significant security risks if not properly managed. Organizations should prioritize regular updates and thorough configuration reviews to maintain robust security postures.