CVE-2026-40479: Kimai/kimai Cross-Site Scripting Vulnerability
MODERATECVE-2026-40479 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Kimai/kimai libraries in the Packagist ecosystem. The issue involves kimai has stored xss via incomplete html attribute escaping in team member widget. Remediation is available by upgrading affected packages to version 2.53.0.
CVE-2026-40479 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-40479
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.53.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-40479, 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.53.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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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-40479 Affected Kimai/kimai Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
kimai/kimai
|
Packagist |
< 2.53.0
|
2.53.0
|
References
Frequently Asked Questions
What is CVE-2026-40479?
Which Kimai/kimai versions are affected?
What version fixes CVE-2026-40479?
Is kimai/kimai affected?
What is the CVSS score of CVE-2026-40479?
What CWE is associated with CVE-2026-40479?
How can I check Packagist dependencies for CVE-2026-40479?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g82g-m9vx-vhjg",
"modified" : "2026-04-27T15:20:26Z",
"published" : "2026-04-15T19:46:35Z",
"aliases" : [ "CVE-2026-40479" ],
"summary" : "Kimai has Stored XSS via Incomplete HTML Attribute Escaping in Team Member Widget",
"details" : "### Summary\nThe client-side `escapeForHtml()` function in `KimaiEscape.js`, introduced in commit `89bfa82c` (#2959) to fix a JavaScript XSS vulnerability, only escapes `<`, `>`, and `&` but does not escape `\"` (double quote) or `'` (single quote). When user-controlled data (profile alias) is placed in an HTML attribute context (`title=\"__DISPLAY__\"`) via the team member form prototype and rendered through `innerHTML`, the missing quote escaping allows HTML attribute injection, resulting in Stored XSS.\n\n### Details\nIncomplete security patch. The `escapeForHtml()` function was meant to prevent XSS but missed quote characters, which are critical for HTML attribute context escaping.\n\n**Vulnerable code** — `assets/js/plugins/KimaiEscape.js:29-33`:\n```javascript\nconst tagsToReplace = {\n '&': '&',\n '<': '<',\n '>': '>',\n // MISSING: '\"': '"'\n // MISSING: \"'\": '''\n};\n```\n\n**Affected code files**:\n- `assets/js/plugins/KimaiEscape.js:24-38` — incomplete escape function\n- `assets/js/forms/KimaiTeamForm.js:77,86` — replacement + innerHTML\n- `templates/macros/widgets.html.twig:126` — `title=\"{{ tooltip }}\"` in avatar macro\n- `templates/form/blocks.html.twig:104` — `{{ widgets.avatar('__INITIALS__', '__COLOR__', '__DISPLAY__') }}`\n\n### PoC\n[poc.zip](https://github.com/user-attachments/files/26537515/poc.zip)\n\nPlease extract the uploaded compressed file before proceeding\n\n1. ./setup.sh\n2. ./poc_xss.sh\n\n<img width=\"751\" height=\"155\" alt=\"스크린샷 2026-04-07 오후 9 06 27\" src=\"https://github.com/user-attachments/assets/c09a23fb-f60b-49dd-9018-8c723e35b4c4\" />\n\n### Impact\n- Stored XSS: payload persists in the database (user alias field)\n- Privilege escalation: ROLE_USER injects XSS that executes in ROLE_ADMIN/ROLE_SUPER_ADMIN browser session",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "kimai/kimai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.53.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/kimai/kimai/security/advisories/GHSA-g82g-m9vx-vhjg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40479"
}, {
"type" : "WEB",
"url" : "https://github.com/kimai/kimai/pull/2959"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kimai/kimai"
}, {
"type" : "WEB",
"url" : "https://github.com/kimai/kimai/releases/tag/2.53.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-15T19:46:35Z",
"nvd_published_at" : "2026-04-17T23:16:12Z"
}
}