NetSight
mittel5.4

CVE-2026-40296

PhpSpreadsheet has XSS via number format code with @ text placeholder bypasses htmlspecialchars in HTML writer

Auswirkung

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.

Ein Angreifer kann die Lücke über das Netzwerk ausnutzen, mit einem normalen Benutzerkonto, allerdings muss ein Nutzer etwas tun, etwa eine Datei oder einen Link öffnen. Bei Erfolg: geringes Risiko, dass Daten ausgelesen werden, geringes Risiko, dass Daten oder Systeme verändert werden. Der Angriff kann über die verwundbare Komponente hinaus wirken.

Betroffene Pakete

ÖkosystemPaketBetroffenBehoben in
composerphpoffice/phpspreadsheet>= 4.0.0, <= 5.6.05.7.0

Betroffene Produkte · Phpoffice

ProduktBetroffene Versionen
Phpspreadsheet
vor 1.30.4
ab 2.0.0 vor 2.1.16
ab 2.2.0 vor 2.4.5
ab 3.3.0 vor 3.10.5
ab 4.0.0 vor 5.7.0

Schwachstellenklasse

Referenzen