{"id":"CVE-2026-52824","aliases":["CVE-2026-52824","GHSA-jr9p-4h4j-6c58"],"related":[],"kind":"vulnerability","state":"published","title":"Kimai: Default APP_SECRET in Docker Image Enables Cookie Forgery and Account Takeover","summary":"Kimai is an open-source time tracking application. Prior to 2.58.0, the official Docker image sets APP_SECRET to the public value change_this_to_something_unique in Dockerfile, and .docker/entrypoint.sh neither replaces nor rejects that value before Symfony uses it as kernel.secret. An unauthenticated attacker who reaches a deployment that did not override APP_SECRET, knows a username, correctly guesses the account ID associated with that username, and targets an account without active two-factor authentication can forge HMAC-protected authentication artifacts, including KIMAI_REMEMBER cookies and login links, to access the account without its password. The updated entrypoint generates and persists a random secret when no safe operator-provided value exists. This issue is fixed in version 2.58.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Kimai is an open-source time tracking application. Prior to 2.58.0, the official Docker image sets APP_SECRET to the public value change_this_to_something_unique in Dockerfile, and .docker/entrypoint.sh neither replaces nor rejects that value before Symfony uses it as kernel.secret. An unauthenticated attacker who reaches a deployment that did not override APP_SECRET, knows a username, correctly guesses the account ID associated with that username, and targets an account without active two-factor authentication can forge HMAC-protected authentication artifacts, including KIMAI_REMEMBER cookies and login links, to access the account without its password. The updated entrypoint generates and persists a random secret when no safe operator-provided value exists. This issue is fixed in version 2.58.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe official Kimai Docker image ships with `APP_SECRET=change_this_to_something_unique` as the default environment variable. The Docker entrypoint does not override or validate this value. Any Kimai instance deployed using the Docker image without explicitly setting `APP_SECRET` runs with a publicly-known Symfony `kernel.secret`, enabling an unauthenticated attacker to forge HMAC-signed cookies and login links to take over any account including super_admin.\n\n### Details\n\n`Dockerfile:263` sets `ENV APP_SECRET=change_this_to_something_unique`. This value is consumed by `config/packages/framework.yaml:7` as `kernel.secret`, which Symfony uses to HMAC-sign:\n\n- The `KIMAI_REMEMBER` remember-me cookie\n- LoginLink signatures\n- Password reset URLs\n- CSRF tokens\n\nThe `.docker/entrypoint.sh` does not check for or replace the default sentinel value. The bare-metal `.env.dist:38` ships the same default. No startup-time guard exists anywhere in the codebase that refuses to start when `APP_SECRET` equals the sentinel.\n\nUser IDs are sequential integers starting from 1. The first super_admin account is almost always `id=1`. User IDs are visible in some URLs and API responses.\n\n*A PoC was provided, but removed for security reasons.*\n\n### Impact\n\nAny Kimai instance deployed via the official Docker image without overriding `APP_SECRET` can be compromised from the internet. An unauthenticated attacker who can reach the Kimai URL can forge authentication tokens and log in as any user if:\n- a username is known AND\n- the correct account ID for this username is guessed AND\n- the account has no active 2FA (two factor) authentication\n\n## Solution\n\n- The entrypoint.sh file is updated and now contains a script that generates a random `APP_SECRET` via `bin2hex(random_bytes(32))` which will be stored in  `/opt/kimai/var/data/.appsecret`\n- The entrypoint.sh will create the file `/opt/kimai/.env.local` containing the `APP_SECRET`, either fetched from the Docker Environment or from the newly created secret file\n- The documentation was updated to highlight the importance of using a random secret for `APP_SECRET`\n- The Dockerfile removed default `APP_SECRET=change_this_to_something_unique`\n- Login links now contain more entropy (see GHSA-m492-gv72-xvxj) - so even without all previous changes, attackers won't be able to generate Login links even for installations that have a hard-coded `APP_SECRET=change_this_to_something_unique`\n\nSee [https://www.kimai.org/en/security/ghsa-jr9p-4h4j-6c58](https://www.kimai.org/en/security/ghsa-jr9p-4h4j-6c58) for more information.","format":"markdown","source":"ghsa"}],"published":"2026-07-14T00:07:59.000Z","modified":"2026-09-30T17:51:56.193Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","score":9.1,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"CRITICAL"}],"cwes":["CWE-1188"],"affected":[{"ranges":[{"version":"< 2.58.0","status":"affected"}],"vendor":"kimai","product":"kimai","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.58.0"}],"ecosystem":"Packagist","package":"kimai/kimai","purl":"pkg:composer/kimai/kimai","source":"ghsa"}],"references":[{"url":"https://github.com/kimai/kimai/security/advisories/GHSA-jr9p-4h4j-6c58","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/kimai/kimai/pull/5952","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/kimai/kimai/commit/31a8f887a5cda517db7b4320a7ad997c87d08601","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/kimai/kimai/releases/tag/2.58.0","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://www.kimai.org/en/security/ghsa-jr9p-4h4j-6c58","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/kimai/kimai","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-09-16T17:32:52.166Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-52824","url":"https://www.cve.org/CVERecord?id=CVE-2026-52824","licence":"CVE Terms of Use","modified":"2026-09-16T17:33:01.273Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jr9p-4h4j-6c58","url":"https://github.com/advisories/GHSA-jr9p-4h4j-6c58","licence":"CC-BY-4.0","modified":"2026-07-14T00:26:47.189Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-52824","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52824","licence":"Public domain","modified":"2026-09-30T17:51:56.193Z"}],"updatedAt":"2026-11-25T22:59:38.492Z","epss":{"score":0.02062,"percentile":0.81891,"date":"2026-12-01T12:00:22.000Z"}}