{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-45046","id":"CVE-2024-45046","title":"PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via style information","description":"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 HTM","descriptionLong":"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.","published":"2024-08-28T20:41:23.628Z","updated":"2026-10-28T02:30:49.629272033Z","reserved":"2024-08-21T17:53:51.331Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","rating":"medium","source":"GitHub"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":["PHPOffice PhpSpreadsheet"],"affectedProducts":[{"vendor":"PHPOffice","product":"PhpSpreadsheet","defaultStatus":null,"versions":[{"version":"< 2.1.0","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"phpoffice/phpspreadsheet","purl":"pkg:composer/phpoffice/phpspreadsheet","ranges":[">=2.0.0 <2.1.0","<1.29.1"],"fixed":["2.1.0","1.29.1"],"advisory":"GHSA-wgmf-q9vr-vww6"},{"ecosystem":"Packagist","name":"phpoffice/phpexcel","purl":"pkg:composer/phpoffice/phpexcel","ranges":["<=1.8.2"],"fixed":[],"advisory":"GHSA-wgmf-q9vr-vww6"}],"cwes":["CWE-79"],"aliases":["GHSA-wgmf-q9vr-vww6"],"references":[{"url":"https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-wgmf-q9vr-vww6","tags":["x_refsource_CONFIRM","Exploit","Third Party Advisory","advisory","web"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/pull/3957","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/commit/f7cf378faed2e11cf4825bf8bafea4922ae44667","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/45xxx/CVE-2024-45046.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-45046","tags":["advisory"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00418,"epssPercentile":0.3689,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-45046","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-45046","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-45046","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-wgmf-q9vr-vww6","ok":true,"note":"GHSA-wgmf-q9vr-vww6"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-45046","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}