Kimai CVE-2026-49865
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to Kimai with customer-record write access
-
DeliveryInject malicious Markdown image URL into Customer.invoiceText
-
ExploitTrigger invoice PDF preview for that customer
-
Executionmd2html converts Markdown to HTML, preserving image tag
-
PersistmPDF fetches attacker-specified URL server-side
-
ImpactProbe internal network services or cloud metadata endpoint
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Credential 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 an authenticated Kimai session with write access to Markdown-rendered invoice fields such as Customer.invoiceText - this is typically held by administrative or finance-role users, not general authenticated users. The SSRF is triggered when an invoice PDF preview or full PDF generation is initiated for the affected customer record; this action can be performed by the same attacker who injected the payload, requiring no separate victim interaction. The attack is limited to deployments using the default mPDF-based PDF invoice template with the md2html Markdown filter enabled. Key limiting factors: (1) the attacker must hold a Kimai account with customer-record write permissions; (2) the utility of the SSRF depends entirely on what internal services, metadata endpoints, or administrative interfaces are network-accessible from the Kimai application server - environments with egress filtering or strong network segmentation will see significantly reduced impact; (3) Kimai deployments behind a reverse proxy with outbound filtering may further constrain what destinations the server can reach. |
| Impact | No vendor-supplied CVSS vector or EPSS score is available for this CVE; risk must be assessed from the description and contextual signals alone. The vulnerability is exploitable by any authenticated user with write access to customer Markdown fields - typically administrative or finance personnel, not external unauthenticated attackers - which meaningfully constrains the attack surface. However, in multi-tenant or shared Kimai deployments where untrusted internal users have access to customer records, this constraint is weaker. The SSRF impact is primarily internal network probing and metadata endpoint access (e.g., cloud metadata services at 169.254.169.254), with potential for further lateral movement depending on what internal services are reachable from the Kimai server. There is no CISA KEV listing and no publicly available exploit code (the PoC was submitted to the vendor and then withheld). Real-world priority is moderate to elevated for cloud-hosted deployments or those with rich internal service adjacency; organizations with strict egress filtering or network segmentation separating the Kimai host from internal infrastructure face substantially lower risk. The absence of CVSS and EPSS data means this analysis cannot compare exploitation probability signals - this data gap should be noted by security teams making prioritization decisions. |
| Exploit ScenarioDerived | An authenticated Kimai user with access to customer records injects a Markdown image tag referencing an internal service - for example, the AWS EC2 instance metadata endpoint at http://169.254.169.254/latest/meta-data/ - into the Customer.invoiceText field. When the same attacker (or any other authorized user) triggers an invoice PDF preview for that customer, the mPDF renderer issues an HTTP GET request from the Kimai server to the embedded URL, confirming reachability to internal services or returning sensitive metadata content. A proof-of-concept demonstrating this server-side fetch behavior was confirmed by the vendor during disclosure, though the PoC itself was not released publicly. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 10, 2026
Server-side request forgery in Kimai 2.56.0 allows authenticated users with write access to Markdown-rendered invoice fields to force the application server to issue outbound HTTP requests to attacker-controlled or internal network destinations. The vulnerability surfaces during invoice PDF preview and generation, where user-controlled Markdown is processed through an md2html filter and handed to mPDF, which fetches embedded image URLs server-side even with safe mode enabled. A proof-of-concept was developed and responsibly disclosed to the vendor - it is not publicly available - and no active exploitation has been confirmed; however, the attack path is mechanically simple for any user with access to customer invoice text fields such as Customer.invoiceText.
RemediationAI
Upgrade Kimai to the patched release issued after 2.56.0 per the vendor advisory at https://github.com/kimai/kimai/security/advisories/GHSA-pj8j-p4g4-4vw8 - the exact patched version number is not stated in available data, so consult the Kimai release page directly to identify the first version containing the fix. The vendor's remediation has two components: Markdown image syntax is now converted to plain HTML links rather than being rendered as embedded images (eliminating the mPDF fetch trigger), and a specialized NoPrivateNetworkHttpClient is used for all mPDF HTTP requests, blocking access to private IP ranges and sensitive URL schemes. The full list of blocked URL patterns post-fix is documented at https://www.kimai.org/documentation/pdf-templates.html#embedding-images. Note that this fix is a documented breaking change for deployments that host invoice or export template images on the Kimai domain itself or on internal IP addresses - those images will no longer embed in generated PDFs. As a compensating control prior to patching, restrict outbound network access from the Kimai application server using host or network firewall rules, specifically blocking egress to RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and the APIPA/metadata address (169.254.169.254); this limits SSRF utility without affecting the application's core function. Additionally, restrict write access to Customer.invoiceText and equivalent Markdown-rendered fields to only highly trusted, explicitly vetted users to reduce the pool of potential attackers.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in composer
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Kimai (pkg:composer/kimai_kimai) is an open-source PHP time-tracking application. The vulnerability exists in its invoice PDF rendering chain: user-supplied Markdown content stored in fields like Customer.invoiceText is copied into the invoice model, filtered through a Markdown-to-HTML converter (md2html), and then passed to mPDF - a PHP library for generating PDF documents from HTML. mPDF actively resolves external resource URLs (such as image src attributes) server-side during rendering to embed assets into the generated PDF. Although safe mode was enabled on the Markdown filter, Markdown image syntax (e.g., an image reference to an attacker-controlled URL) survived HTML transformation in a form that mPDF still honored by issuing an outbound HTTP GET request. CWE-918 (Server-Side Request Forgery) is the root cause: the application accepts user-controlled URLs embedded in Markdown and passes them through to a server-side HTTP client without adequate restriction on permitted destinations, allowing the server itself to act as an unintended proxy.
Know when the next one hits your stack
- 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:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N
Network-reachable with low complexity; PR:L because customer-field write access requires an authenticated role; Scope:Changed as server contacts out-of-scope systems; C:L for internal service probing with no direct integrity or availability impact.
Primary rating from Vendor (https://github.com/kimai/kimai).
CVSS VectorVendor: https://github.com/kimai/kimai
Lifecycle Timeline
1DescriptionCVE.org
Summary
Kimai 2.56.0 contains a server-side request forgery vulnerability in its invoice PDF preview and generation workflow. If an attacker can control Markdown content that is later rendered into an invoice PDF, such as Customer.invoiceText, the server-side PDF renderer will fetch remote image URLs embedded in Markdown image syntax.
This allows the application server to issue outbound requests to attacker-controlled or internal targets during PDF rendering. The behavior can be used for internal network probing, server-side reachability checks, and potentially follow-on exploitation depending on deployment environment and accessible internal services.
Details
The vulnerable behavior occurs in the invoice rendering chain when user-controlled Markdown is transformed into HTML and then rendered by mPDF.
- First, customer invoice text is copied into the invoice model.
. Second, the default PDF invoice template renders that field through the Markdown-to-HTML filter.
- Third,
md2htmlenables full Markdown rendering. - Although safe mode is enabled, the tested Markdown image syntax still survives into the rendered HTML chain in a form that causes the PDF renderer to fetch the image resource.
- Finally, the HTML is handed to mPDF.
The live test confirms that mPDF attempts to retrieve the remote image URL from the server side during PDF preview. This means the issue is not a template-injection problem but an SSRF condition caused by the rendering pipeline:
- attacker-controlled Markdown
- Markdown converted to HTML
- HTML rendered by mPDF
- mPDF fetches remote image resources from the server side
*A PoC was provided, but removed for security reasons.*
Impact
This vulnerability allows an attacker who can influence invoice-rendered Markdown fields to cause the Kimai server to make outbound requests to arbitrary destinations. In real deployments, this can be used to probe internal services, test access to internal administrative or metadata endpoints, and confirm server-side reachability to attacker-controlled infrastructure.
Depending on the environment, SSRF can also become a stepping stone toward more serious outcomes, such as triggering side effects on internal HTTP services or extracting sensitive information from services reachable only by the server. Because invoice generation is commonly performed by administrative or finance-related users, the feature is realistically reachable in business workflows.
Solution
- Kimai does not allow to use markdown images any longer and converts them to HTML links instead
- Kimai uses a specialized HttpClient for mPDF (called
NoPrivateNetworkHttpClient), which prevents access to a variety of URLs, the full list can be fetched from the documentation - This change can be a BC break, if someone used
- the Kimai domain for hosting invoice or export template images
- an internal IP for hosting invoice or export template images
See https://www.kimai.org/en/security/ghsa-pj8j-p4g4-4vw8
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
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
GHSA-pj8j-p4g4-4vw8
NVD
CVE.org
EPSS
Exploit-DB