PT-2019-12758 · Phpoffice · Phpoffice Phpspreadsheet

Daniel Hoffmann

·

Published

2019-11-07

·

Updated

2024-09-04

·

CVE-2019-12331

CVSS v3.1

8.8

High

VectorAV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions PHPOffice PhpSpreadsheet versions prior to 1.8.0
Description The issue arises from the XmlScanner decoding sheet1.xml from an .xlsx file to utf-8 if a different encoding is declared in the header. This was initially intended as a security measure but is insufficient. By double-encoding the xml payload to utf-7, it is possible to bypass the check for the string <!ENTITY and thus allow for an XML external entity processing (XXE) attack.
Recommendations For versions prior to 1.8.0, update to version 1.8.0 or later to resolve the issue. As a temporary workaround, consider restricting the processing of .xlsx files with non-UTF-8 encoding declarations to minimize the risk of exploitation.

Exploit

Fix

XXE

Weakness Enumeration

Related Identifiers

CVE-2019-12331
GHSA-VVWV-H69M-WG6F

Affected Products

Phpoffice Phpspreadsheet