MediumGHSA-4mqv-gcr3-pff9CVE-2020-7776SNYK-PHP-PHPOFFICEPHPSPREADSHEET-1048856
Cross-site scripting in phpoffice/phpspreadsheet
Published 6 May 2021 · Updated 8 Jul 2026
Affected packages
phpoffice/phpspreadsheetComposer
- Affected
- <1.16.0
- Fixed in
- 1.16.0
Update to the fixed version for your release line, for example:
composer require phpoffice/phpspreadsheet:^1.16.0phpoffice/phpexcelComposer
- Affected
- <=1.8.2
- Fixed in
- No fix released
Details
This affects the package phpoffice/phpspreadsheet. The library is vulnerable to XSS when creating an html output from an excel file by adding a comment on any cell. The root cause of this issue is within the HTML writer where user comments are concatenated as part of link and this is returned as HTML.
Is GHSA-4mqv-gcr3-pff9 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected phpoffice/phpspreadsheet, and gives you the command that fixes it.
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2020-7776
- Linkgithub.com/PHPOffice/PhpSpreadsheet/pull/1719
- Linkgithub.com/PHPOffice/PhpSpreadsheet/commit/0ed5b800be2136bcb8fa9c1bdf59abc957a98845
- Linkgithub.com/FriendsOfPHP/security-advisories/blob/master/phpoffice/phpspreadsheet/CVE-2020-7776.yaml
- Linkgithub.com/PHPOffice/PhpSpreadsheet/blob/master/src/PhpSpreadsheet/Writer/Html.php%23L1792
- Linksnyk.io/vuln/SNYK-PHP-PHPOFFICEPHPSPREADSHEET-1048856
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.