Skip to main content

PhpSpreadsheet CVE-2026-108358

| EUVDEUVD-2026-108265 HIGH
Improper Restriction of XML External Entity Reference (CWE-611)
2026-10-22 GitHub_M
8.8
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Upload crafted XLSX to app
  2. Delivery
    Scanner bypassed by ISO-2022 escape bytes
  3. Exploit
    DOCTYPE and entities parsed by libxml
  4. Execution
    Quadratic entity expansion (or SYSTEM entity fetch)
  5. Impact
    Memory exhaustion / file read / SSRF

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A02:2025 - Security Misconfiguration
ASVS 5.0
V13 - Configuration XML external entity prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The only prerequisite is that the target application accepts and processes an attacker-controlled XLSX file with PhpSpreadsheet's Xlsx reader; the DOCTYPE-scanner bypass works against default configurations with no authentication or user interaction. The denial-of-service via internal (quadratic) entity expansion has NO special conditions and is exploitable on all supported PHP versions because libxml2 2.9+ defaults do not block internal entity expansion. The confidentiality impacts are strictly conditional: local file read and SSRF via external SYSTEM entities are exploitable only on PHP < 8.0 / libxml2 < 2.9, or on any PHP version when the application explicitly parses with the LIBXML_NOENT flag; on modern PHP 8.x without LIBXML_NOENT these are blocked by default. The practical limiting factor is therefore the deployment's PHP/libxml2 version and LIBXML_NOENT usage, not attacker capability.

Impact

This is a credible, prioritize-this-week issue rather than a paper-high-CVSS case. The input CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N, score 8.8) indicates remote, low-complexity, unauthenticated exploitation with no user interaction, and the vuln.today decision label is 'this_week' - consistent with a real but not emergency priority. The strongest signal is the detailed, author-tested PoC in the GHSA advisory (tested on PhpSpreadsheet 5.9.0 / PHP 8.5.3 / libxml2 2.9.13), demonstrating a working XmlScanner bypass and ~22,000:1 memory amplification; this constitutes publicly available exploit code. Crucially, the signals are split by impact class: the denial-of-service via quadratic entity expansion is exploitable on ALL supported PHP versions and default configurations, while the confidentiality impacts (local file read, SSRF via SYSTEM entities) are limited to PHP < 8.0 / libxml2 < 2.9 or deployments that explicitly pass LIBXML_NOENT - on modern PHP 8.x these are blocked by libxml2 defaults. No CISA KEV listing and no EPSS score were provided, so there is no evidence of active in-the-wild exploitation; absence of these is not itself a contradiction. The main caveat to flag: the headline 8.8/VA:H rating is driven by the universally-exploitable DoS plus the conditional confidentiality (VC:L/SC:L), so operators on modern PHP without LIBXML_NOENT should read the realistic impact as DoS-primarily, with file-read/SSRF applying only to the narrower conditions above - verify your PHP/libxml2 version and LIBXML_NOENT usage.

Exploit ScenarioDerived

An attacker uploads a crafted XLSX to any web application that processes user-supplied spreadsheets with PhpSpreadsheet. ISO-2022 escape bytes interleaved inside '<!DOCTYPE' evade XmlScanner::scan(), then XML charset normalization strips those bytes and exposes a valid DOCTYPE with internal entity definitions, so a ~2 KB file expands to ~45 MB of memory; repeated concurrent uploads exhaust server memory. A full, author-tested proof-of-concept is published in the GHSA advisory, and on PHP < 8.0 or when LIBXML_NOENT is set the same bypass additionally enables local file read and SSRF via SYSTEM entities.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 22, 2026

PhpSpreadsheet's XLSX reader can be tricked into parsing attacker-supplied DOCTYPE and entity declarations, because the XML security scanner in XmlScanner::scan() only anticipates NUL-byte interleaving and is defeated by ISO-2022 escape sequences inserted into the declaration. Any application that accepts user-uploaded spreadsheets and processes them with the Xlsx reader is affected, and the prerequisite is only that the file be opened; the CVSS vector shows PR:N/UI:N, so no authentication or interaction beyond the file upload is needed. The reliably exploitable outcome is entity-expansion denial of service on all supported PHP versions (a ~2 KB XLSX produced ~45 MB peak memory in the advisory's testing, roughly a 22,000:1 amplification); local file read and SSRF through external SYSTEM entities are conditional on PHP < 8.0 / libxml2 < 2.9 or on the application explicitly passing LIBXML_NOENT. A public proof-of-concept is published in the GitHub security advisory at https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-3x94-m842-937c; there is no CISA KEV confirmation of active exploitation, and the priority decision is to patch this week.

RemediationAI

Vendor-released patches exist on every supported branch: upgrade to PhpSpreadsheet 1.30.7, 2.1.19, 2.4.8, 3.10.8 or 5.10.0 depending on the major line in use, per the advisory at https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-3x94-m842-937c and the release tags cited there. If immediate upgrading is not possible, note that the advisory's impact table shows the conditional file-read and SSRF paths are blocked on PHP 8.x / libxml2 2.9+ unless the application explicitly parses with LIBXML_NOENT, so removing that flag from any custom SimpleXML/libxml invocation closes those two outcomes - but it does not help with the entity-expansion denial of service, which the advisory reports as exploitable on all supported PHP versions because libxml2 2.9+ defaults do not block internal entity expansion. Because the scanner bypass is only exercised when an attacker-controlled XLSX is parsed, restricting uploads to trusted sources or processing untrusted spreadsheets in a memory-capped, isolated worker reduces the blast radius of the DoS while the upgrade is staged, at the cost of limiting functionality or throughput.

Affected VersionsENISA

PhpSpreadsheet 2.0.0, < 2.1.19
PhpSpreadsheet 3.3.0, < 3.10.8
PhpSpreadsheet 4.0.0, < 5.10.0
PhpSpreadsheet 2.2.0, < 2.4.8
PhpSpreadsheet < 1.30.7

Affected Packages

euvd phpspreadsheet fix: 1.30.7, 2.1.19, 2.4.8, 3.10.8, 5.10.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PhpSpreadsheet reads XLSX files by unzipping the OOXML package and passing each XML part through XmlScanner::scan() in src/PhpSpreadsheet/Reader/Security/XmlScanner.php before handing it to simplexml_load_string(). The scanner's guard is a regular expression designed to catch obfuscated DOCTYPE keywords: it permits optional NUL bytes between each character of '<!DOCTYPE'. That pattern covers NUL interleaving only. ISO-2022 escape sequences (0x1B-prefixed sequences such as ESC ( B for ISO-2022-JP, ESC $ B for ISO-2022-JP-2, ESC $ ) C for ISO-2022-KR, ESC $ ) A and ESC $ ) G for ISO-2022-CN and -CN-EXT, ESC $ ( Q for ISO-2022-JP-2004, and ESC & @ ESC $ B for ISO-2022-JP-MS) inserted between those characters do not match the regex, so the DOCTYPE passes the scanner undetected. The XML parser's charset normalization subsequently strips the ESC bytes, reconstructing a syntactically valid DOCTYPE with entity definitions immediately before parsing. This is the CWE-611 improper restriction of XML external entity reference class combined with CWE-776 improper restriction of recursive entity references (entity expansion). Internal entity expansion is quadratic blowup and is not blocked by libxml2 2.9+ defaults, so the denial-of-service path works on modern PHP; external SYSTEM entities are disabled by default on PHP 8.x / libxml2 2.9+ but remain usable on older stacks or wherever the LIBXML_NOENT flag is set by the calling application. The affected component is the composer package phpoffice/phpspreadsheet, identified in CPE data as cpe:2.3:a:phpoffice:phpspreadsheet. The trigger requires an attacker-controlled XLSX processed through the Xlsx reader; the advisory notes the same XML parts pass through this scanner for other formats handled by the library.

Know when Phpspreadsheet gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.8 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:L/SI:N/SA:N
vuln.today AI 8.2 HIGH

Remote unauthenticated XLSX upload with no interaction (AV:N/AC:L/PR:N/UI:N); universal DoS gives A:H, while file-read/SSRF is conditional, so C:L and I:N.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Oct 22, 2026 - 18:18 EUVD
CVE Published
Oct 22, 2026 - 17:29 cve.org
HIGH 8.8

DescriptionCVE.org

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.

Technical POC Analysis

CWE-611 (Improper Restriction of XML External Entity Reference), with the advisory also assigning CWE-776 (XML Entity Expansion).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

CVE-2026-108358 is a HIGH severity vulnerability in PhpSpreadsheet's XLSX reader that allows attacker-controlled spreadsheets to trigger entity-expansion denial of service. Any application that accepts user-uploaded spreadsheets is affected, and exploitation requires only that the file be opened. Leadership should care because this can cause service outages or resource exhaustion, disrupting business operations and potentially affecting customers or internal users who rely on spreadsheet processing.

Business Impact: High
Compensating Controls

Enforce strict input validation to reject XLSX files containing DOCTYPE or entity declarations; disable external entity loading by ensuring libxml_disable_entity_loader is used (though deprecated in PHP 8.0+, it may still be relevant for older versions); restrict file uploads to authenticated users and limit file size; run the parsing service in a sandboxed environment with limited memory and no network access; consider using an alternative library for XLSX parsing until a patch is available.

Threat Intelligence Overview

Prevalence
High
very widely used PHP spreadsheet library across many web applications
Social Media
1
Sightings
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

XML External Entity (XXE) attacks exploit XML parsers that process Document Type Definitions (DTDs) without proper restrictions.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2024-45291 HIGH POC
8.8 Oct 07

PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Rated high severity (CVSS 8.8), this vul

CVE-2019-12331 HIGH POC
8.8 Nov 07

PHPOffice PhpSpreadsheet before 1.8.0 has an XXE issue. Rated high severity (CVSS 8.8), this vulnerability is remotely e

CVE-2018-19277 HIGH POC
8.8 Nov 14

securityScan() in PHPOffice PhpSpreadsheet through 1.5.0 allows a bypass of protection mechanisms for XXE via UTF-7 enco

CVE-2024-48917 HIGH POC
7.5 Nov 18

PhpSpreadsheet is a PHP library for reading and writing spreadsheet files. Rated high severity (CVSS 7.5), this vulnerab

CVE-2024-47873 HIGH POC
7.5 Nov 18

PhpSpreadsheet is a PHP library for reading and writing spreadsheet files. Rated high severity (CVSS 7.5), this vulnerab

CVE-2024-45290 HIGH POC
7.5 Oct 07

PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Rated high severity (CVSS 7.5), this vul

CVE-2024-45293 HIGH POC
7.5 Oct 07

PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Rated high severity (CVSS 7.5), this vul

CVE-2024-45048 MEDIUM POC
6.5 Aug 28

PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Rated medium severity (CVSS 6.5), this v

CVE-2020-7776 MEDIUM POC
6.4 Dec 09

This affects the package phpoffice/phpspreadsheet from 0.0.0. Rated medium severity (CVSS 6.4), this vulnerability is re

CVE-2024-45060 MEDIUM POC
6.1 Oct 07

PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Rated medium severity (CVSS 6.1), this v

CVE-2024-45292 MEDIUM POC
5.4 Oct 07

PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Rated medium severity (CVSS 5.4), this v

CVE-2024-45046 MEDIUM POC
5.4 Aug 28

PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Rated medium severity (CVSS 5.4), this v

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy