---
id: "CVE-2026-108358"
kind: "vulnerability"
aliases: ["CVE-2026-108358"]
title: "PhpSpreadsheet: crafted XLSX can bypass XXE filter, read local files"
severity: "high"
cvss: 8.8
epss: 0.00385
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["package", "php", "phpspreadsheet", "self-hosted"]
not_affected_if: ["no-untrusted-xlsx-input", "up-to-date-version"]
published_at: "2026-10-22T18:17:26+00:00"
first_seen_at: "2026-10-23T21:57:31+00:00"
updated_at: "2026-10-24T07:15:51+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-108358", "first_seen_at": "2026-10-23T21:57:31+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-108358", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# PhpSpreadsheet: crafted XLSX can bypass XXE filter, read local files

A crafted XLSX file can hide an XML DOCTYPE from the library's scanner using ISO-2022 escape bytes, so the parser later sees it and expands entities. An attacker can cause a denial of service, and on PHP before 8.0 or with LIBXML_NOENT enabled, read local files or make server-side requests.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

Run: composer show phpoffice/phpspreadsheet and compare the version against the fixed releases.

## Fix

Upgrade phpoffice/phpspreadsheet to 1.30.7, 2.1.19, 2.4.8, 3.10.8, or 5.10.0 (whichever matches your major line).
If you cannot upgrade, do not parse untrusted XLSX uploads.

## Timeline

- 2026-10-23T21:57:31+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-108358
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-108358

## From the sources

PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0, XmlScanner::scan in src/PhpSpreadsheet/Reader/Security/XmlScanner.php uses a DOCTYPE detection pattern that accounts for NUL-byte interleaving but not ISO-2022 escape sequences in XLSX XML parts. The escape sequences prevent the scanner from matching the declaration, and XML charset normalization then removes the escape bytes before parsing, exposing a valid DOCTYPE and entity definitions. Processing an attacker-controlled XLSX can therefore cause entity-expansion denial of service on supported PHP versions and can permit local file access or SSRF on PHP before 8.0 or when LIBXML_NOENT is enabled. This issue is fixed in versions 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
