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

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.0
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

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.