MediumGHSA-4mqv-gcr3-pff9CVE-2020-7776SNYK-PHP-PHPOFFICEPHPSPREADSHEET-1048856
Cross-site scripting in phpoffice/phpspreadsheet
Published 6 May 2021 · Updated 8 Jul 2026
Is your project on an affected phpoffice/phpspreadsheet?
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.
More advisories for phpoffice/phpspreadsheet
- MediumCVE-2026-108360PhpSpreadsheet: SSRF whitelist bypass via unre-validated HTTP redirect in Drawing::setPath external image loading · 27 Oct 2026
- HighCVE-2026-108359PhpSpreadsheet ODS Reader: Unbounded number-rows-repeated → CPU & Memory Exhaustion (DoS) · 27 Oct 2026
- HighCVE-2026-108358PhpSpreadsheet: XmlScanner Bypass via ISO-2022 Escape Sequences Allows XXE and Denial of Service · 27 Oct 2026
- HighCVE-2026-108357PhpSpreadsheet: XmlScanner Bypass via Double-Encoded unentity() TOCTOU Allows XXE and Denial of Service · 27 Oct 2026
- HighCVE-2026-59933PHPSpreadsheet: XLS/OLE sector-chain self-loop causes memory exhaustion · 23 Jul 2026
- HighCVE-2026-59932PHPSpreadsheet: Gnumeric reader unbounded gzip expansion causes memory exhaustion · 23 Jul 2026
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.