Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade exceljs-hardened to version 5.1.0 or higher.
Affected versions of this package are vulnerable to External Control of File Name or Path via stream.xlsx.WorkbookWriter#addImage, which accepts a filename parameter containing ../ path traversal segments without validation. The non-streaming Workbook#addImage rejects such input, but the streaming writer passes the path directly to the ZIP writer, which reads the file and stores it under xl/media/ in the generated workbook. An attacker who controls the image filename passed to addImage can cause addMedia to embed any file readable by the Node.js process into the output workbook, disclosing its contents to whoever receives the file.
const wb = new ExcelJS.stream.xlsx.WorkbookWriter({ filename: 'out.xlsx' });
wb.addImage({ filename: '../../../../etc/hostname', extension: 'png' });
const ws = wb.addWorksheet('S');
ws.addRow([1]).commit();
await ws.commit();
await wb.commit();
out.xlsx now contains xl/media/image0.png with the content of /etc/hostname.
The same call on Workbook#addImage throws a parent-directory traversal error.