CVE-2026-40296

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

Configuration 1 (hide)

OR cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:*
cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:*
cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:*
cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:*
cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:*

History

26 Oct 2026, 19:10

Type Values Removed Values Added
Summary
  • (es) PhpSpreadsheet es una biblioteca PHP pura para leer y escribir archivos de hoja de cálculo. El escritor HTML omite el escape de htmlspecialchars cuando el valor formateado de una celda difiere del valor original. Cuando una celda tiene un formato de número personalizado que contiene el marcador de posición de texto @ junto con cualquier carácter literal adicional (por ejemplo, ’. @’, ’@ ’, o ’x@’), el formateador reemplaza @ con el valor de la celda y añade los caracteres adicionales, haciendo que el valor formateado difiera del original y omitiendo completamente el escape HTML. Un atacante que puede controlar el valor de la celda y el formato de número de una hoja de cálculo cargada que luego se convierte a HTML y se muestra a otros usuarios puede lograr cross-site scripting almacenado. Este problema está solucionado en las versiones 5.7.0, 3.10.5, 2.4.5, 2.1.16 y 1.30.4.

Information

Published : 2026-05-06 22:16

Updated : 2026-10-26 19:10


NVD link : CVE-2026-40296

Mitre link : CVE-2026-40296

CVE.ORG link : CVE-2026-40296


JSON object : View

Products Affected

phpoffice

  • phpspreadsheet
CWE
CWE-79

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')