CVE-2026-40296: PHPOffice PhpSpreadsheet · Cross-site Scripting
Affects PHPOffice PhpSpreadsheetSource CVE Database V5
Not known to be exploited · CVSS 5.4 Medium · fixed in 5.7.0 : update PHPOffice PhpSpreadsheet when convenient.
Data as of 29 Oct 2026, 19:04 UTC
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 13% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 5.7.0
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 6 May 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PHPOfficePhpSpreadsheet | Affected
| Fixed in– |
Packagistphpoffice/phpspreadsheetpkg:composer/phpoffice/phpspreadsheetOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Fixed versions are available starting at PhpSpreadsheet 5.7.0 and corresponding updates in earlier branches (3.10.5, 2.4.5, 2.1.16, 1.30.4). Users should upgrade to these versions to remediate the vulnerability. Patch status is not explicitly confirmed in the provided data; therefore, users should consult the official vendor advisory for the latest remediation guidance and confirm patch availability before deployment.
Description
PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. The HTML writer skips htmlspecialchars escaping when a cell's formatted value differs from the original value. When a cell has a custom number format containing the text placeholder @ along with any additional literal characters (for example ". @", "@ ", or "x@"), the formatter replaces @ with the cell value and adds the extra characters, causing the formatted value to differ from the original and bypassing HTML escaping entirely. An attacker who can control the cell value and number format of an uploaded spreadsheet that is later converted to HTML and displayed to other users can achieve stored cross-site scripting. This issue is fixed in versions 5.7.0, 3.10.5, 2.4.5, 2.1.16, and 1.30.4.