PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via style information
PHPOffice PhpSpreadsheet
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| phpoffice/phpspreadsheet Packagist |
|
|
| phpoffice/phpexcel Packagist |
| No fix yet |
PHPOffice PhpSpreadsheet
| Product | Affected | Fixed in |
|---|---|---|
| phpoffice/phpspreadsheet Packagist |
|
|
| phpoffice/phpexcel Packagist |
| No fix yet |
PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. In affected versions `\PhpOffice\PhpSpreadsheet\Writer\Html` doesn't sanitize spreadsheet styling information such as font names, allowing an attacker to inject arbitrary JavaScript on the page. As a result an attacker may used a crafted spreadsheet to fully takeover a session of a user viewing spreadsheet files as HTML. This issue has been addressed in release version 2.1.0. All users are advised to upgrade. There are no known workarounds for this vulnerability.
From the CVE record · GitHub_M
Affected versions of PhpSpreadsheet do not sanitize spreadsheet styling information in the HTML writer. An attacker can use a crafted spreadsheet to inject JavaScript and take over the session of a user who views the spreadsheet as HTML. The input does not specify whether the attacker needs authentication.
Check installations of phpoffice/phpspreadsheet versions >=2.0.0 <2.1.0 or <1.29.1, and phpoffice/phpexcel versions <=1.8.2.