Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain System-Admin credentials or account
-
DeliveryAccess Kimai admin panel
-
ExploitCraft malicious Twig template with file path injection
-
ExecutionUpload invoice template via upload_invoice_template endpoint
-
PersistTrigger invoice generation for any invoice
-
ImpactExtract embedded file content from PDF output
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to: (1) possess a Kimai user account with the System-Admin role (ROLE_SYSTEM_ADMIN); (2) have the upload_invoice_template permission explicitly granted; and (3) be able to access the invoice generation feature to trigger PDF rendering with the malicious template. Additionally, the target file must be readable by the PHP worker process - typically application-level files, configuration files within the web root or app directory, or database backup files stored in accessible locations. System files outside the application context (e.g., /etc/shadow, private SSH keys) are generally not readable by PHP workers in standard hardened deployments. No user interaction or special configuration of Kimai is required; default installations are vulnerable if System-Admins exist and the upload feature is enabled. |
| Impact | Despite a CVSS score of 4.1 (Low-Medium), this vulnerability presents moderate real-world risk due to the specific conditions limiting exploitation. The CVSS vector (AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N) correctly reflects network accessibility but high privilege requirement (PR:H = System-Admin role needed), which significantly restricts the attacker pool. EPSS score not provided, but exploitation is unlikely widespread given the dual requirements of (1) System-Admin account access and (2) invoice_template_upload permission. The path traversal scope is limited to files readable by the PHP worker process (typically unable to read system root or SSH keys in hardened deployments). No public exploit code exists, and no active exploitation has been reported. Risk escalation occurs only if the Kimai instance has overprivileged PHP workers or stores sensitive data in web-accessible or application-readable directories. In properly hardened deployments with least-privilege PHP processes, impact is confined to application-level data. The CVSS complexity is Low (AC:L), indicating no special exploit conditions beyond crafted template syntax. |
| Exploit ScenarioDerived | A malicious System-Admin user logs into Kimai and uploads a specially crafted PDF invoice template containing Twig code that calls pdfContext.setOption('associated_files', ['/etc/passwd']). When an invoice is generated using this template, mPDF's SetAssociatedFiles() method executes file_get_contents('/etc/passwd'), reads the file contents, and embeds them as a FlateDecode stream in the output PDF. The attacker downloads the generated invoice and extracts the embedded plaintext file contents from the PDF. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 08, 2026
Kimai versions 2.32.0 through 2.55.x allow System-Admin users with invoice template upload permission to read arbitrary files from the PHP server via malicious PDF invoice templates. The vulnerability exploits mPDF's SetAssociatedFiles() function combined with unsanitized Twig template rendering to access any file readable by the PHP worker process and embed it within generated PDF invoices. No public exploit code or active exploitation has been identified; patch available in version 2.56.0.
RemediationAI
Upgrade Kimai to version 2.56.0 or later immediately. The vendor's fix (PR #5924) implements whitelist validation of PDF context options, preventing arbitrary option injection including 'associated_files'. To upgrade, update your Kimai installation using git (git checkout 2.56.0) or download the release from https://github.com/kimai/kimai/releases/tag/2.56.0, then run database migrations if required. Note that version 2.56.0 requires PHP 8.2 minimum; if still on PHP 8.1 or earlier, upgrade PHP first to 8.2 or 8.5 as PHP 8.1 is end-of-life. If immediate upgrade is not possible, restrict the 'upload_invoice_template' permission to only trusted administrators and audit existing invoice templates for malicious content. Monitor PHP worker file access logs for unusual file_get_contents() calls targeting sensitive paths outside the Kimai application directory.
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's invoice template feature uses Twig template rendering to generate PDF documents via the mPDF library. The vulnerability stems from insufficient whitelisting of PDF context options passed to mPDF through the sandboxed Twig environment. When a System-Admin uploads a malicious PDF invoice template containing pdfContext.setOption('associated_files', ...), the application forwards this directly to mPDF's SetAssociatedFiles() method. During PDF output generation, mPDF's writer calls file_get_contents() on each file path in the associated_files array without path validation, allowing traversal attacks (CWE-22). The attacker's file contents are then embedded as FlateDecode streams within the output PDF, which is returned to the user. This is a post-authentication information disclosure vulnerability requiring elevated permissions (ROLE_SYSTEM_ADMIN) and specific upload capability.
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
AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionNVD
Kimai is an open-source time tracking application. From version 2.32.0 to before version 2.56.0, users with the role System-Admin (ROLE_SYSTE_ADMIN) and the permission upload_invoice_template can upload PDF invoice templates, which can call pdfContext.setOption('associated_files', ...) inside the sandboxed Twig render. This is forwarded to mPDF's SetAssociatedFiles(), whose writer calls file_get_contents($entry['path']) during PDF output and embeds the bytes as a FlateDecode stream in the PDF. Any file readable by the PHP worker is returned to the attacker inside the rendered invoice. This issue has been patched in version 2.56.0.
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
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
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-28517
GHSA-h5fh-7hwr-97mw
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB