Skip to content

← Actionable
High, CVSS 7.5

XmlScanner bypass leads to XXE

CVE-2024-47873GHSA-jw4x-v69f-hh5w

What to do

Partial vendor fix. Follow the primary source's mitigation guidance and check back for a fix.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • Packagist phpoffice/phpexcel

    Affected
    <= 1.8.2
    Fixed in
    no fixed version recorded
  • Packagist phpoffice/phpspreadsheet

    Affected
    < 1.29.4>= 2.0.0, < 2.1.3>= 2.2.0, < 2.3.2>= 3.3.0, < 3.4.0
    Fixed in
    1.29.4, 3.4.0, 2.1.3, 2.3.2

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.5 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
  • CVE-2024-47873: 0.76% estimated exploitation activity in the next 30 days; percentile 55.34 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary The XmlScanner class has a scan method which should prevent XXE attacks. However, the regexes used in the scan method and the findCharSet method can be bypassed by using UCS-4 and encoding guessing as described in <https://www.w3.org/TR/xml/#sec-guessing-no-ext-info. Details The scan method converts the input in the UTF-8 encoding if it is not already in the UTF-8 encoding with the toUtf8 method. Then, the scan method uses a regex which would also work with 16-bit encoding. However, the regexes from the findCharSet method, which is used for determining the current encoding can be bypassed by using an encoding which has more than 8 bits, since the regex does not expect null bytes, and the XML library will also autodetect the encoding as described in <https://www.w3.org/TR/xml/#sec-guessing-no-ext-info. A payload for the workbook.xml file can for example be created with…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-jw4x-v69f-hh5w

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2024-47873

Advisory: XmlScanner bypass leads to XXE
IDs: CVE-2024-47873, GHSA-jw4x-v69f-hh5w
Record: https://patchnext.com/advisories/cve-2024-47873 (revision 1, source checked 26 Oct 2026, 14:29 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.5)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Partial vendor fix; fixed versions by package: phpoffice/phpspreadsheet 3.4.0, 2.3.2, 2.1.3, 1.29.4. A vendor fix does not mean a deployment is fixed.

## Affected components
- Packagist phpoffice/phpexcel: affected <= 1.8.2
- Packagist phpoffice/phpspreadsheet: affected < 1.29.4; >= 2.0.0, < 2.1.3; >= 2.2.0, < 2.3.2; >= 3.3.0, < 3.4.0; fixed in 1.29.4, 3.4.0, 2.1.3, 2.3.2

## Suggested inspection (read-only)
- Packagist phpoffice/phpexcel: check the installed version with your package manager.
- Packagist phpoffice/phpspreadsheet: check the installed version with your package manager.

## Supported action
No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on phpoffice/phpexcel, phpoffice/phpspreadsheet.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-jw4x-v69f-hh5w (GitHub-reviewed advisory GHSA-jw4x-v69f-hh5w lists affected ranges: Packagist phpoffice/phpspreadsheet >=0 =2.0.0 =2.2.0 =3.3.0 =0 <=1.8.2)

Commands are suggestions: review each one before running it.

Loading voting…