Описание
Kimai has an XXE Leading to Local File Read
Summary
Kimai uses PHPSpreadsheet for importing and exporting invoices. Recently, a CVE was identified in PHPSpreadsheet, which could lead to an XXE vulnerability.
Details
Exploitation requires an Administrator account, allowing the upload of an XLSX template containing the payload. The vulnerability is triggered by the following code snippet:
The IOFactory::load function utilizes simplexml_load_string, which has previously been demonstrated to be vulnerable to XXE attacks.
While this is not directly an XXE in Kimai, it does however impact the latest stable version.
PoC
By uploading a malicious XLSX template, the payload will be triggered every time an invoice is generated.
For a better a visibility, I will upload both a:
- Malicious template sample for testing
- An exported invoice, showing the contents of target file during the export.
Impact
Local File Read / RCE in edge cases where phar:// can be utilized with gadget chains .
Пакеты
kimai/kimai
<= 2.20.1
2.21.0
8.5 High
CVSS4
6.5 Medium
CVSS3
Дефекты
8.5 High
CVSS4
6.5 Medium
CVSS3