CVE-2026-49865: Kimai/kimai Kimai Has Server-Side Request Forgery Vulnerability
MODERATECVE-2026-49865 is a MODERATE kimai has server-side request forgery vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Kimai/kimai libraries in the Packagist ecosystem. The issue involves kimai has server-side request forgery in invoice pdf rendering via markdown image urls. Remediation is available by upgrading affected packages to version 2.58.0.
CVE-2026-49865 at a Glance
How to Fix CVE-2026-49865
To remediate this vulnerability, upgrade all affected Kimai/kimai dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade kimai/kimai to 2.58.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for kimai/kimai
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-49865, inspect your project dependencies for Kimai/kimai:
inspect dependencies for kimai/kimai
Analyze the terminal output to locate any version of Kimai/kimai in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.58.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Kimai/kimai, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-49865 Affected Kimai/kimai Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
kimai/kimai
|
Packagist |
< 2.58.0
|
2.58.0
|
References
Frequently Asked Questions
What is CVE-2026-49865?
Which Kimai/kimai versions are affected?
What version fixes CVE-2026-49865?
Is kimai/kimai affected?
What CWE is associated with CVE-2026-49865?
How can I check Packagist dependencies for CVE-2026-49865?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pj8j-p4g4-4vw8",
"modified" : "2026-07-10T16:04:40Z",
"published" : "2026-07-10T16:04:40Z",
"aliases" : [ "CVE-2026-49865" ],
"summary" : "Kimai has Server-Side Request Forgery in Invoice PDF Rendering via Markdown Image URLs",
"details" : "### Summary\n\nKimai 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.\n\nThis 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.\n\n### Details\n\nThe vulnerable behavior occurs in the invoice rendering chain when user-controlled Markdown is transformed into HTML and then rendered by mPDF.\n\n- First, customer invoice text is copied into the invoice model.\n. Second, the default PDF invoice template renders that field through the Markdown-to-HTML filter. \n- Third, `md2html` enables full Markdown rendering. \n- 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.\n- Finally, the HTML is handed to mPDF. \n\nThe 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:\n\n- attacker-controlled Markdown\n- Markdown converted to HTML\n- HTML rendered by mPDF\n- mPDF fetches remote image resources from the server side\n\n*A PoC was provided, but removed for security reasons.*\n\n### Impact\n\nThis 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.\n\nDepending 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.\n\n# Solution\n\n- Kimai does not allow to use markdown images any longer and converts them to HTML links instead\n- 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)\n- This change can be a BC break, if someone used \n - the Kimai domain for hosting invoice or export template images \n - an internal IP for hosting invoice or export template images \n\nSee https://www.kimai.org/en/security/ghsa-pj8j-p4g4-4vw8",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "kimai/kimai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.58.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.57.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/kimai/kimai/security/advisories/GHSA-pj8j-p4g4-4vw8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kimai/kimai"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-10T16:04:40Z",
"nvd_published_at" : null
}
}