Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as admin with template permission
-
DeliveryCreate malicious Twig invoice template embedding getApiToken() call
-
ExploitSet template as customer default
-
ExecutionVictim user generates invoice
-
PersistHashed API token appears in rendered invoice output
-
ImpactAdmin retrieves token from invoice
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires all of the following concrete conditions: (1) Kimai must be an OnPremise self-hosted installation - cloud deployments are not affected; (2) the invoice template upload feature must be activated in the instance configuration, which is not the default state; (3) the attacker must hold ROLE_ADMIN or higher AND possess the manage_invoice_template permission; (4) a victim user must generate an invoice using the malicious template after it has been set as default - passive deployment alone is insufficient. Exploitation is limited by the fact that leaked tokens are hashed (bcrypt/sodium), not plaintext, and API tokens are deprecated in Kimai since April 2024. Legitimate admin access to template management is the primary barrier; there is no unauthenticated or low-privilege exploitation path. |
| Impact | Real-world risk is materially lower than the CWE-94 classification might suggest. The CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:H/UI:P) and score of 2.0 accurately reflect the high barriers: exploitation demands ROLE_ADMIN or higher with the manage_invoice_template permission, a specific non-default installation mode (OnPremise with template upload enabled), and a victim user who subsequently generates an invoice using the malicious template. No KEV listing exists and no public exploit tool is identified at time of analysis - though the GHSA advisory provides step-by-step reproduction steps, lowering the skill bar for any attacker already holding admin credentials. The leaked data is bcrypt or sodium-hashed API tokens, not plaintext passwords or session credentials, further limiting post-exploitation utility. Additionally, Kimai's vendor notes that API tokens have been deprecated since April 2024, narrowing the population of deployments where token compromise carries meaningful consequence. EPSS data is not provided; given the high privilege prerequisite and niche product, opportunistic mass exploitation is implausible. |
| Exploit ScenarioDerived | An administrator with the manage_invoice_template permission logs into a self-hosted Kimai instance and creates a new Twig invoice template containing {{ model.user.getApiToken() }} and {{ model.user.getPlainApiToken() }}, then sets it as the default template for one or more customers. When any regular user assigned to those customers subsequently generates an invoice, the rendered output silently includes their hashed API token, which the admin can retrieve from the invoice document. The GHSA advisory provides complete step-by-step reproduction instructions, lowering the execution bar for any attacker already possessing admin credentials. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 26, 2026
Kimai's Twig invoice template sandbox fails to block the getApiToken() and getPlainApiToken() User methods, allowing admins with template creation permissions to exfiltrate hashed API tokens from any user who generates an invoice using that template. Affected are OnPremise deployments of Kimai before 2.53.0 where invoice template upload is enabled and admins hold the manage_invoice_template permission. No public exploit is independently confirmed, but the GHSA advisory includes complete proof-of-concept reproduction steps; the CVSS 4.0 score of 2.0 reflects the high prerequisite access level and limited confidentiality impact. Note: the 'RCE' tag present in source intelligence appears to be a mis-tag - the vulnerability is information disclosure, not remote code execution.
RemediationAI
Upgrade to Kimai 2.53.0 or later, which resolves the issue by adding getapitoken and getplainapitoken to the StrictPolicy::checkMethodAllowed() blocklist via pull request #5878 (https://github.com/kimai/kimai/pull/5878). The vendor advisory is available at https://github.com/kimai/kimai/security/advisories/GHSA-rh42-6rj2-xwmc. If immediate upgrade is not possible on OnPremise installations, a targeted compensating control is to revoke or restrict the manage_invoice_template permission from all admin accounts - this eliminates the attacker's ability to create or modify templates, with the trade-off that invoice template management must be performed manually or deferred. Since API tokens are deprecated since April 2024, auditing and disabling API token usage across the user base will also eliminate the value of any tokens that may have already been exfiltrated via this vector.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Kimai (cpe:2.3:a:kimai:kimai:*:*:*:*:*:*:*:*) uses a sandboxed Twig templating engine for rendering invoice templates, governed by StrictPolicy::checkMethodAllowed() in src/Twig/SecurityPolicy/StrictPolicy.php. This blocklist explicitly denies access to sensitive User object methods such as getpassword, gettotpsecret, getplainpassword, getconfirmationtoken, and gettotpauthenticationconfiguration. However, getApiToken() and getPlainApiToken() were omitted from this blocklist, making them freely callable within any Twig invoice template. The invoice rendering model exposes a User object via model.user, giving templates direct access to the victim user's API token data. CWE-94 (Code Injection) is assigned because attacker-controlled Twig template code executes within a supposedly sandboxed context with unintended method access - the root cause being an incomplete allowlist/blocklist in the policy enforcement layer.
Know when Kimai gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
PR:H reflects mandatory admin-level permission; UI:R because a victim user must generate an invoice; C:L for hashed token disclosure only, no integrity or availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Kimai before 2.53.0 fails to block sensitive User methods in the Twig invoice template sandbox, allowing admins to call getApiToken() and getPlainApiToken() methods. Attackers with template creation permissions can embed these method calls in invoice templates to leak hashed API tokens in rendered invoice output.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Account takeover in Kimai time-tracking software (versions <= 2.57.0) stems from the official Docker image shipping a pu
kimai2 is vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). Rated crit
Kimai is a web-based multi-user time-tracking application. Rated high severity (CVSS 7.2), this vulnerability is remotel
Kimai versions prior to 2.46.0 contain an overly permissive Twig sandbox configuration in the export functionality that
Kimai versions prior to 2.51.0 lack proper customer-level access controls in the invoice API endpoint, allowing any user
Kimai is a web-based multi-user time-tracking application. Rated medium severity (CVSS 6.5), this vulnerability is remot
kimai2 is vulnerable to Cross-Site Request Forgery (CSRF). Rated medium severity (CVSS 6.5), this vulnerability is remot
kimai2 is vulnerable to Cross-Site Request Forgery (CSRF). Rated medium severity (CVSS 6.5), this vulnerability is remot
Authorization bypass in the Kimai open-source time-tracking application before 2.56.0 lets any authenticated user holdin
Kimai 2 contains a persistent cross-site scripting vulnerability that allows attackers to inject malicious scripts into
Password reset links in Kimai before 2.58.0 function as persistent authentication credentials because the LoginLink HMAC
Authorization bypass in Kimai's QuickEntry controller allows authenticated network users holding view_other_timesheet an
EUVD-2026-66223
GHSA-hqh5-vhwr-rg24
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB