Description
ExcelJS through 4.4.0 contains an arbitrary file read vulnerability in the streaming WorkbookWriter that allows attackers to read local files by supplying crafted image filenames to addImage. Attackers can inject ../ path segments into user-controlled image paths, causing addMedia to embed any file readable by the Node.js process under xl/media in the generated workbook.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| exceljs | exceljs | ≤ 4.4.0 | — |
References
- https://github.com/exceljs/exceljs product
- GitHub Security Advisory (GHSA-f9m8-8qmf-qq29) third-party-advisory
- https://github.com/exceljs/exceljs/blob/v4.4.0/lib/stream/xlsx/workbook-writer.js#L230-L237 technical-description
- https://github.com/exceljs/exceljs/blob/v4.4.0/lib/stream/xlsx/workbook-writer.js#L124-L130 technical-description
- VulnCheck Advisory: ExcelJS through 4.4.0 Arbitrary File Read via WorkbookWriter addImage Filename third-party-advisory