Advisory

GHSA-vvwv-h69m-wg6f

Also known as: CVE-2019-12331

Summary

XXE in PHPSpreadsheet due to incomplete fix for previous encoding issue

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2019-11-20 01:39 UTC
Modified
2025-03-06 18:09 UTC

Affected packages and fixes

phpoffice/phpspreadsheet

Packagist · All systems

Affected

  • introduced 0, fixed 1.8.0 (ecosystem)

Fixed versions

1.8.0

Fix

The export has no generic command for this ecosystem.

phpoffice/phpexcel

Packagist · All systems

Affected

  • introduced 0, last affected 1.8.2 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences