Critical Kimai Flaw Lets Attackers Forge Cookies and Take Over Accounts


A critical Kimai vulnerability can let an unauthenticated attacker forge trusted authentication data and take over user accounts, including a super administrator account. The attack is possible when a self-hosted Kimai installation retains the application’s publicly known default secret.

The vulnerability is tracked as CVE-2026-52824 and GHSA-jr9p-4h4j-6c58. According to the official Kimai security advisory, versions 2.57.0 and earlier are affected, while version 2.58.0 contains the fix.

Administrators should upgrade to the latest available Kimai release and confirm that the deployment uses a unique, randomly generated APP_SECRET. Updating the application without correcting an old deployment configuration may leave questions about whether the exposed secret was fully replaced.

Who Is Affected by CVE-2026-52824?

The flaw was discovered in the official Kimai Docker image, which included change_this_to_something_unique as the default value for APP_SECRET. The Docker startup process did not require administrators to change that value.

However, the scope is wider than Docker alone. Kimai’s bare-metal default configuration used the same placeholder, so any self-hosted installation that never replaced it may be vulnerable regardless of its deployment method.

The GitHub advisory for CVE-2026-52824 assigns the issue a critical CVSS 4.0 score of 9.1. It lists network access, no required privileges and no user interaction as key characteristics of the vulnerability.

DeploymentPotentially affected?Required action
Official Docker image, Kimai 2.57.0 or earlier, default secret retainedYesUpgrade and replace the secret immediately
Bare-metal installation using the placeholder secretYesUpgrade and replace the secret immediately
Self-hosted installation with a strong unique secretNot exposed through the known default secretUpgrade to receive all related hardening
Kimai 2.58.0 or later installed with secure configurationFixedKeep the application updated
Kimai CloudNoNo action required for this vulnerability

Why the Default APP_SECRET Is Dangerous

Kimai is built on Symfony and uses APP_SECRET as the framework’s kernel secret. The application relies on this value when signing several security-sensitive tokens.

A digital signature allows Kimai to determine whether a cookie, login link or other value was created by the application and has not been modified. That protection fails when an attacker already knows the signing secret.

Because the placeholder was published in the image and source configuration, it was not secret. Separate installations that retained the value effectively shared the same cryptographic key.

  • KIMAI_REMEMBER remember-me cookies
  • Login-link signatures
  • Password-reset URLs
  • Cross-site request forgery tokens

How an Account Takeover Could Happen

An attacker who can reach a vulnerable Kimai site over the network may be able to create authentication data that the application accepts as genuine. No valid password or existing authenticated session is required.

To target a particular account through the documented takeover path, the attacker must know its username and determine the corresponding numeric user ID. The target account must also lack active two-factor authentication.

Kimai user IDs are sequential and begin at 1. The first super administrator account is commonly assigned ID 1, and user IDs can appear in some application URLs and API responses. These details can make privileged accounts easier to identify.

Attack requirementDetails
Network accessThe attacker must be able to reach the Kimai application
Known default secretThe installation must still use the public placeholder value
Target usernameThe attacker must know a valid Kimai username
Correct user IDThe numeric ID must be known or successfully guessed
No active 2FAThe targeted account must not be protected by two-factor authentication

Does Two-Factor Authentication Stop the Attack?

Kimai says accounts with active two-factor authentication are not affected by this specific takeover path. This makes 2FA an important additional control for administrator and other privileged accounts.

Two-factor authentication does not remove the vulnerable shared secret or protect every function that relies on it. Administrators must still upgrade and rotate APP_SECRET, even if all privileged accounts use 2FA.

Password changes alone do not fix the vulnerability because the weakness is in the application’s signing key rather than a user’s password. Password resets should be considered when logs or account activity indicate a possible compromise.

What Changed in Kimai 2.58.0?

Kimai 2.58.0 changes the initialization process so a new installation no longer depends on a shared placeholder. If an administrator does not provide a secret, the entrypoint generates a random value using bin2hex(random_bytes(32)).

The generated secret is stored persistently at /opt/kimai/var/data/.appsecret. The entrypoint then writes the active configuration to /opt/kimai/.env.local. The hard-coded default was removed from the Dockerfile.

The patch details are documented in the GitHub security advisory. Login links also received additional entropy as a defense-in-depth improvement.

  • Removed the fixed default secret from the Docker image
  • Added automatic generation of a cryptographically random secret
  • Stored the generated value in persistent application data
  • Created a local environment configuration with the active secret
  • Updated documentation to require a unique secret
  • Added more entropy to login links

Upgrade to the Latest Kimai Version

Version 2.58.0 is the minimum release containing the fix. The Kimai release history shows that newer releases have since become available.

At the time of writing, Kimai’s update documentation identifies version 2.62.0 as the latest release. Administrators should normally move to the latest supported version rather than stopping at the minimum fixed build.

Before upgrading, create and test a database backup. Kimai’s official update instructions also recommend checking the upgrade documentation for manual changes that may apply to the installed version or plugins.

How to Determine Whether an Installation Is Exposed

Administrators should inspect the effective application configuration, Docker Compose files, orchestration secrets and environment-management platform used by the deployment. The goal is to determine which value the running application actually receives as APP_SECRET.

Do not copy the active secret into tickets, chat systems, screenshots or diagnostic logs. Treat it as a credential. Access to production environment variables should be limited to authorized administrators.

An installation should be considered exposed if its effective secret equals change_this_to_something_unique. Systems upgraded from older versions also require attention because an existing environment variable may override the safer behavior introduced by the new image.

  1. Identify every self-hosted Kimai instance.
  2. Record its application version and deployment method.
  3. Inspect the effective APP_SECRET without disclosing it.
  4. Check whether the public placeholder is still configured.
  5. Upgrade any release at or below version 2.57.0.
  6. Replace the secret with a unique random value.
  7. Restart or recreate the application containers.
  8. Confirm that the new configuration remains after another restart.

Rotating APP_SECRET Requires Care

Changing APP_SECRET invalidates values signed with the previous key. Users may be signed out, and existing remember-me cookies, login links, password-reset links and CSRF tokens may stop working.

This is an expected security effect. Administrators should schedule the change, notify users about required sign-ins and avoid switching back to the exposed value if an old token fails.

Each Kimai installation should receive its own randomly generated secret. Reusing one value across development, staging and production would increase the impact if that secret were later disclosed.

Incident Response for an Exposed Installation

An internet-accessible Kimai instance that used the default secret should be treated as potentially exposed. The advisory confirms that remote account takeover was possible, but it does not state that every vulnerable deployment was compromised.

Teams should review application, reverse-proxy and identity logs for unusual sessions or administrative actions. Useful evidence can include unexpected source addresses, changes to privileged users, new API tokens and activity performed outside normal working hours.

The Kimai remediation guidance says existing installations using the placeholder should set a unique random secret immediately. Kimai Cloud customers do not need to rotate a secret for this issue because the hosted service already uses strong, random values.

  • Rotate APP_SECRET and restart the application.
  • Invalidate active sessions and remember-me cookies where possible.
  • Review super administrator and administrator accounts.
  • Remove unknown accounts, API tokens and integrations.
  • Enable 2FA for every privileged account.
  • Review recent password-reset and login-link activity.
  • Check time records, customers, projects and invoices for unauthorized changes.
  • Preserve relevant logs before normal retention removes them.
  • Reset user passwords if evidence suggests account access.
PriorityActionReason
ImmediateRestrict public access if the default secret is still activeReduces exposure while remediation is underway
ImmediateUpgrade to the latest available Kimai versionInstalls the fixed initialization process and related hardening
ImmediateSet a unique high-entropy APP_SECRETPrevents signatures from being created with the public key
HighInvalidate sessions and review privileged accountsLimits continued access after possible account takeover
HighEnable 2FA for administratorsBlocks the documented takeover path against protected accounts
HighReview logs and sensitive data changesHelps identify signs of prior exploitation
OngoingFollow the Kimai update processKeeps the deployment on supported security releases

No Public Exploitation Confirmed

The original report included a proof of concept, but it was removed from the advisory to reduce misuse. The public advisory does not report confirmed exploitation in real-world attacks.

Absence of confirmed exploitation should not delay remediation. The default secret is public, the application can be reached remotely in many deployments and successful exploitation can provide access to sensitive business and time-tracking information.

AzureADTrent reported the vulnerability, and Kimai maintainer Kevin Papst developed the correction. Administrators can review the official Kimai releases to select the newest supported build and should not deploy any version earlier than 2.58.0.

FAQ

What is CVE-2026-52824?

CVE-2026-52824 is a critical Kimai vulnerability caused by a publicly known default APP_SECRET. An unauthenticated attacker may be able to forge signed authentication data and take over an account.

Which Kimai versions are affected?

Kimai versions 2.57.0 and earlier are affected. Version 2.58.0 is the first fixed release, but administrators should install the latest available version.

Is the vulnerability limited to Kimai Docker installations?

No. The official Docker image exposed the problem, but Kimai says bare-metal installations using the same unchanged placeholder secret are also affected.

Is Kimai Cloud affected by CVE-2026-52824?

No. Kimai says its cloud service is not affected because each hosted instance uses a strong and random APP_SECRET.

Does two-factor authentication prevent Kimai account takeover?

Kimai says accounts with active two-factor authentication are not affected by the documented takeover path. Administrators must still upgrade and replace the insecure secret.

What should administrators do about CVE-2026-52824?

Administrators should upgrade Kimai, replace APP_SECRET with a unique random value, restart the application, invalidate sessions, review privileged accounts and enable two-factor authentication.

Readers help support VPNCentral. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help VPNCentral sustain the editorial team Read more

User forum

0 messages