Free and open · new CVEs checked every 20 minutesStatusRSSOpen dataContact

CVE-2026-40902: PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files

45
This week
HIGH 7.5REMOTEUPGRADE

CVE-2026-40902 is a high-severity flaw (CVSS 7.5) affecting phpspreadsheet. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.

PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to 1.30.4, 2.1.16, 2.4.5, 3.10.5, and 5.7.0, the XLSX reader's ColumnAndRowAttributes::readRowAttributes() method reads row numbers from XML attributes without validating them against the spreadsheet maximum row limit (AddressRange::MAX_ROW = 1,048,576). An attacker can craft a minimal XLSX file (~1.6KB) containing a <row r="999999999"/> element that inflates ca

Why this priority

  • High severity
  • Public exploit reference
  • Remotely exploitable, no login, no user action

A fixed release or distro patch exists.

Risk facts

CVSS score7.5 (High)
Attack vectorNetwork (remote)
Attack complexityLow
Privileges neededNone
User interactionNone
EPSS exploit chance0.4% (top 67%)
CISA exploited listNo
WeaknessCWE-770
Published2026-05-12
Last modified2026-10-26
Publisher (CNA): GitHub, Inc. · Vendor: phpoffice

Share: LinkedIn · X · Reddit

Last updated 2026-10-26 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score

Am I affected?

Timeline

phpoffice phpspreadsheet UPGRADE
Affected: < 1.30.4 · >= 2.0.0 and < 2.1.16 · >= 2.2.0 and < 2.4.5 · >= 3.3.0 and < 3.10.5 · >= 4.0.0 and < 5.7.0
Fixed in: 1.30.4, 2.1.16, 2.4.5, 3.10.5, 5.7.0
Safe to downgrade to: a release before 2.0.0
1. Check installed version
apt-cache policy phpspreadsheet || rpm -q phpspreadsheet || phpspreadsheet --version
2. UPGRADE to 1.30.4 (Debian / Ubuntu)
sudo apt update && sudo apt install --only-upgrade phpspreadsheet
2. UPGRADE (RHEL / Amazon Linux / Fedora)
sudo dnf upgrade phpspreadsheet
Note
Distros often backport fixes without changing the version number. Confirm with the distro advisory or changelog.
3. If no update is available yet, DOWNGRADE to a release before 2.0.0 (Debian / Ubuntu)
apt-cache madison phpspreadsheet sudo apt install phpspreadsheet=<VERSION_BEFORE_2.0.0> sudo apt-mark hold phpspreadsheet
3. If no update is available yet, DOWNGRADE (RHEL / Amazon Linux / Fedora)
dnf --showduplicates list phpspreadsheet sudo dnf downgrade phpspreadsheet-<VERSION_BEFORE_2.0.0> sudo dnf versionlock add phpspreadsheet
Downgrade risk
Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Restart the service, and keep the package held until a fixed release ships.
Verify at the official source NVD · CVE Program · Report a problem with this page
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.

Quick answers

How do I fix CVE-2026-40902?

phpspreadsheet: upgrade to 1.30.4, 2.1.16, 2.4.5, 3.10.5, 5.7.0. Exact commands for each OS are on this page.

Is CVE-2026-40902 being exploited?

CVE-2026-40902 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.

What does CVE-2026-40902 affect?

CVE-2026-40902 affects phpspreadsheet. Severity is high (CVSS 7.5). PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to 1.30.4, 2.1.16, 2.4.5, 3.10.5, and 5.7.0, the XLSX reader's ColumnAndRowAttributes::readRowAttributes() method reads row numbers from XML attributes wi

How urgent is CVE-2026-40902?

Priority 45/100. High severity; Public exploit reference; Remotely exploitable, no login, no user action

Software pages

PHP vulnerabilities

Related CVEs

References

← Back to latest CVEs

Get the weekly exploited-CVE digest by emailThe CVEs being attacked this week and how to fix them. No spam, unsubscribe any time.