# CVE-2024-56412: PhpSpreadsheet vulnerable to bypass of the XSS sanitizer using the javascript protocol and special characters

- Severity: Medium 4.8 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.39%, higher than 35% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-01-03T17:20:51.827Z
- Modified: 2026-06-17T08:12:09.637Z
- Also known as: GHSA-q9jv-mm3r-j47r
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

PhpSpreadsheet is a PHP library for reading and writing spreadsheet files. Versions prior to 3.7.0, 2.3.5, 2.1.6, and 1.29.7 are vulnerable to bypass of the cross-site scripting sanitizer using the javascript protocol and special characters. An attacker can use special characters, so that the library processes the javascript protocol with special characters and generates an HTML link. Versions 3.7.0, 2.3.5, 2.1.6, and 1.29.7 contain a patch for the issue.

(As written by CVE List.)

## Affected

- PHPOffice PhpSpreadsheet: >= 3.0.0, < 3.7.0; < 1.29.7; >= 2.0.0, < 2.1.6; >= 2.2.0, < 2.3.5; before 1.29.7; from 2.0.0 before 2.1.6; from 2.2.0 before 2.3.5; from 3.0.0 before 3.7.0
- phpoffice/phpspreadsheet (Packagist): from 3.0.0 before 3.7.0; before 1.29.7; from 2.0.0 before 2.1.6; from 2.2.0 before 2.3.5
- phpoffice/phpexcel (Packagist): up to 1.8.2

## Every score

- GitHub_M: CVSS:4.0 4.8 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-q9jv-mm3r-j47r> (exploit, vendor-advisory, web)
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/45052f88e04c735d56457a8ffcdc40b2635a028e> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-56412> (advisory)
- <https://github.com/PHPOffice/PhpSpreadsheet> (package)

## Sources

- CVE List: [CVE-2024-56412](https://www.cve.org/CVERecord?id=CVE-2024-56412), CVE Terms of Use, modified 2025-01-03
- GitHub Advisory Database: [GHSA-q9jv-mm3r-j47r](https://github.com/advisories/GHSA-q9jv-mm3r-j47r), CC-BY-4.0, modified 2025-03-06
- NVD: [CVE-2024-56412](https://nvd.nist.gov/vuln/detail/CVE-2024-56412), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-56412 · Whole record: https://cve.day/CVE-2024-56412.json · Rebuilt by cve.day 2026-11-25T22:58:50.685Z
