Live threats

All CVEs / Phpoffice

CVE-2019-12331Phpoffice Phpspreadsheet

High 8.8 No auth needed

Priority
68
CVSS 3.1
8.8
EPSS
1.4%
probability of exploitation in 30 days · percentile 72
Auth required
No
Published
Nov 7, 2019
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-611
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

What happens

PHPOffice PhpSpreadsheet before 1.8.0 has an XXE issue. The XmlScanner decodes the sheet1.xml from an .xlsx to utf-8 if something else than UTF-8 is declared in the header. This was a security measurement to prevent CVE-2018-19277 but the fix is not sufficient. By double-encoding the the xml payload to utf-7 it is possible to bypass the check for the string ‚<!ENTITY‘ and thus allowing for an xml external entity processing (XXE) attack.

Original NVD text.

What to do

  1. Apply the vendor's security update for Phpspreadsheet.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Packagist phpoffice/phpexcel ≤ 1.8.2 no fixed version —
Packagist phpoffice/phpspreadsheet < 1.8.0 1.8.0 composer require "phpoffice/phpspreadsheet:^1.8.0"

Per OSV / GitHub Advisories (GHSA-vvwv-h69m-wg6f). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
phpofficephpspreadsheet< 1.8.0

Official sources

References

Links published by the sources. Open them with care.