{"id":"CVE-2026-42267","aliases":["CVE-2026-42267","GHSA-3xc2-h5r3-wv3r"],"related":[],"kind":"vulnerability","state":"published","title":"Kimai: Formula Injection via tag names in XLSX export","summary":"Kimai is an open-source time tracking application. From version 2.27.0 to before version 2.54.0, any ROLE_USER can create a tag with a formula string as its name (e.g. =SUM(54+51)) via POST /api/tags and assign it to a timesheet. When an admin exports timesheets to XLSX, ArrayFormatter.formatValue() joins tag names with implode() and returns the result unchanged. OpenSpout promotes any =-prefixed string to a FormulaCell, writing <f>SUM(54+51)</f> into the XLSX archive. Excel evaluates the formula when the file is opened. This issue has been patched in version 2.54.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Kimai is an open-source time tracking application. From version 2.27.0 to before version 2.54.0, any ROLE_USER can create a tag with a formula string as its name (e.g. =SUM(54+51)) via POST /api/tags and assign it to a timesheet. When an admin exports timesheets to XLSX, ArrayFormatter.formatValue() joins tag names with implode() and returns the result unchanged. OpenSpout promotes any =-prefixed string to a FormulaCell, writing <f>SUM(54+51)</f> into the XLSX archive. Excel evaluates the formula when the file is opened. This issue has been patched in version 2.54.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nAny `ROLE_USER` can create a tag with a formula string as its name (e.g. `=SUM(54+51)`) via `POST /api/tags` and assign it to a timesheet. When an admin exports timesheets to XLSX, `ArrayFormatter.formatValue()` joins tag names with `implode()` and returns the result unchanged. OpenSpout promotes any `=`-prefixed string to a `FormulaCell`, writing `<f>SUM(54+51)</f>` into the XLSX archive. Excel evaluates the formula when the file is opened.\n\n## Details\n\n### 1. `ArrayFormatter` does not sanitize before returning\n\n`sanitizeDDE()` exists on `StringHelper` and is called by `TextFormatter`, but `ArrayFormatter` never calls it.\n```php\n// src/Export/Package/CellFormatter/ArrayFormatter.php:24\nreturn implode(', ', $value);  // no sanitizeDDE() call\n```\n\n### 2. Tag name validation does not block formula trigger characters\n\nThe API blocks commas in tag names but permits `=`, `+`, `-`, and `@` - all valid formula prefixes in Excel and LibreOffice Calc.\n\n### 3. OpenSpout silently promotes strings to formula cells\n\n`Cell::fromValue(\"=SUM(54+51)\")` returns a `FormulaCell` with no warning.\n\n### PoC\n\n1. It logs in as normal user, creates tag `=SUM(54+51)`, assigns it to a timesheet.\n2. Admin has to export timesheets to Excel version via `/en/export/` endpoint.\n\n<img width=\"1339\" height=\"700\" alt=\"image\" src=\"https://github.com/user-attachments/assets/884c7943-5e3b-4647-8bcc-e264d6719d66\" />\n\n<img width=\"1304\" height=\"128\" alt=\"formula_injection_tags\" src=\"https://github.com/user-attachments/assets/ef28f2ad-7491-4a15-bb18-1fcd6ff5e55a\" />\n\n## Impact\n\n- Any `ROLE_USER` can plant a formula that executes on the workstation of any user who exports and opens timesheet data\n- A single malicious tag poisons all future exports across all users and date ranges until the tag is deleted\n\n## Fixes\n\n1. Prevent `=` being part of the tag name (and other fields as well)\n2. Use OpenSpout `TextCell` for everything that is a string","format":"markdown","source":"ghsa"},{"lang":"es","text":"Kimai es una aplicación de seguimiento de tiempo de código abierto. Desde la versión 2.27.0 hasta antes de la versión 2.54.0, cualquier ROLE_USER puede crear una etiqueta con una cadena de fórmula como su nombre (p. ej., =SUMA(54+51)) a través de POST /API/tags y asignarla a una hoja de horas. Cuando un administrador exporta hojas de horas a XLSX, ArrayFormatter.formatValue() une los nombres de las etiquetas con implode() y devuelve el resultado sin cambios. OpenSpout promueve cualquier cadena prefijada con ’=’ a una FormulaCell, escribiendo [f]SUMA(54+51)[/f] en el archivo XLSX. Excel evalúa la fórmula cuando se abre el archivo. Este problema ha sido parcheado en la versión 2.54.0.","source":"nvd"}],"published":"2026-05-05T20:53:38.000Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","score":5.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N","score":5.7,"rating":"MEDIUM"}],"cwes":["CWE-1236"],"affected":[{"ranges":[{"version":">= 2.27.0, < 2.54.0","status":"affected"}],"vendor":"kimai","product":"kimai","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.27.0","status":"affected","fixed":"2.54.0"}],"ecosystem":"Packagist","package":"kimai/kimai","purl":"pkg:composer/kimai/kimai","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.27.0","fixed":"2.54.0"}],"vendor":"kimai","product":"kimai","cpe":"cpe:2.3:a:kimai:kimai:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/kimai/kimai/security/advisories/GHSA-3xc2-h5r3-wv3r","tags":["exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/kimai/kimai/releases/tag/2.54.0","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42267","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/kimai/kimai","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-05-08T12:57:49.978Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42267","url":"https://www.cve.org/CVERecord?id=CVE-2026-42267","licence":"CVE Terms of Use","modified":"2026-05-08T12:58:12.770Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3xc2-h5r3-wv3r","url":"https://github.com/advisories/GHSA-3xc2-h5r3-wv3r","licence":"CC-BY-4.0","modified":"2026-05-14T20:48:37.800Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42267","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42267","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:20.949Z","epss":{"score":0.00332,"percentile":0.18833,"date":"2026-11-30T12:00:22.000Z"}}