Kimai has Server-Side Request Forgery in Invoice PDF Rendering via Markdown Image URLs (CVE-2026-49865)
### 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, `md2html` enables 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](https://www.kimai.org/documentation/pdf-templates.html#embedding-images) - 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
AI Analysis
Technical Summary
Kimai 2.56.0 and earlier versions have an SSRF vulnerability in the invoice PDF preview and generation workflow. When attacker-controlled Markdown content containing image URLs is rendered into PDF, the mPDF renderer fetches these remote images server-side. This enables an attacker with control over invoice Markdown fields to make the Kimai server issue outbound HTTP requests to arbitrary or internal network targets. The vulnerability arises because Markdown images survive the Markdown-to-HTML conversion and are fetched by mPDF during PDF rendering. The issue is not template injection but SSRF caused by the rendering pipeline. The vulnerability is mitigated in Kimai 2.58.0 by disabling Markdown image rendering and using a restricted HTTP client that prevents access to private network addresses.
Potential Impact
An attacker able to influence invoice-rendered Markdown fields can cause the Kimai server to make arbitrary outbound HTTP requests. This can be used to probe internal network services, test access to internal administrative endpoints, and confirm server-side reachability to attacker-controlled infrastructure. Depending on deployment, this SSRF could lead to further exploitation such as triggering side effects on internal services or extracting sensitive information accessible only from the server. Since invoice generation is typically performed by administrative or finance users, the vulnerability is realistically exploitable in business workflows.
Mitigation Recommendations
Kimai 2.58.0 and later versions have mitigations that disable Markdown image rendering by converting them to HTML links instead. Additionally, Kimai uses a specialized HTTP client (`NoPrivateNetworkHttpClient`) for mPDF that blocks requests to private network addresses and other restricted URLs. Users should upgrade to version 2.58.0 or later to apply these fixes. Note that this change may cause backward compatibility issues if invoice or export templates rely on hosting images on the Kimai domain or internal IP addresses. Patch status: An official fix is available in Kimai 2.58.0.
Kimai has Server-Side Request Forgery in Invoice PDF Rendering via Markdown Image URLs (CVE-2026-49865)
Description
### 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, `md2html` enables 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](https://www.kimai.org/documentation/pdf-templates.html#embedding-images) - 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
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Kimai 2.56.0 and earlier versions have an SSRF vulnerability in the invoice PDF preview and generation workflow. When attacker-controlled Markdown content containing image URLs is rendered into PDF, the mPDF renderer fetches these remote images server-side. This enables an attacker with control over invoice Markdown fields to make the Kimai server issue outbound HTTP requests to arbitrary or internal network targets. The vulnerability arises because Markdown images survive the Markdown-to-HTML conversion and are fetched by mPDF during PDF rendering. The issue is not template injection but SSRF caused by the rendering pipeline. The vulnerability is mitigated in Kimai 2.58.0 by disabling Markdown image rendering and using a restricted HTTP client that prevents access to private network addresses.
Potential Impact
An attacker able to influence invoice-rendered Markdown fields can cause the Kimai server to make arbitrary outbound HTTP requests. This can be used to probe internal network services, test access to internal administrative endpoints, and confirm server-side reachability to attacker-controlled infrastructure. Depending on deployment, this SSRF could lead to further exploitation such as triggering side effects on internal services or extracting sensitive information accessible only from the server. Since invoice generation is typically performed by administrative or finance users, the vulnerability is realistically exploitable in business workflows.
Mitigation Recommendations
Kimai 2.58.0 and later versions have mitigations that disable Markdown image rendering by converting them to HTML links instead. Additionally, Kimai uses a specialized HTTP client (`NoPrivateNetworkHttpClient`) for mPDF that blocks requests to private network addresses and other restricted URLs. Users should upgrade to version 2.58.0 or later to apply these fixes. Note that this change may cause backward compatibility issues if invoice or export templates rely on hosting images on the Kimai domain or internal IP addresses. Patch status: An official fix is available in Kimai 2.58.0.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-pj8j-p4g4-4vw8
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-49865"]
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a520ee668715ace4391cece
Added to database: 07/11/2026, 09:37:42 UTC
Last enriched: 07/11/2026, 10:08:09 UTC
Last updated: 07/31/2026, 14:41:41 UTC
Views: 40
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.