Free and open · new CVEs checked every 20 minutesStatusRSSOpen dataContact

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

27
Routine
MEDIUM 5.4UPGRADE

CVE-2026-40296 is a medium-severity flaw (CVSS 5.4) 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. 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 t

Why this priority

  • Public exploit reference

A fixed release or distro patch exists.

Risk facts

CVSS score5.4 (Medium)
Attack vectorNetwork (remote)
Attack complexityLow
Privileges neededLow
User interactionRequired
EPSS exploit chance0.2% (top 87%)
CISA exploited listNo
WeaknessCWE-79
Published2026-05-06
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-40296?

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-40296 being exploited?

CVE-2026-40296 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-40296 affect?

CVE-2026-40296 affects phpspreadsheet. Severity is medium (CVSS 5.4). 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

How urgent is CVE-2026-40296?

Priority 27/100. Public exploit reference

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.