CVE-2024-48917
PHP vulnerability analysis and mitigation

Overview

PhpSpreadsheet, a PHP library for reading and writing spreadsheet files, was found to contain a vulnerability (CVE-2024-48917) in its XmlScanner class. The vulnerability was discovered as a bypass of the previously reported CVE-2024-47873, where the security mechanism designed to prevent XXE (XML External Entity) attacks could be circumvented. This vulnerability affects multiple versions of PhpSpreadsheet prior to versions 1.9.4, 2.1.3, 2.3.2, and 3.4.0 (GitHub Advisory).

Technical details

The vulnerability exists in the XmlScanner class's findCharSet method, which is responsible for determining the current encoding. The bypass involves using a payload in UTF-7 encoding and adding a comment at the end of the file with the value encoding="UTF-8" using double quotes, which is matched by the first regex. This allows encoding='UTF-7' with single quotes in the XML header to bypass the second regex check. The vulnerability has been assigned a CVSS v3.1 base score of 7.5 (High) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, indicating network accessibility with no required privileges or user interaction (GitHub Advisory, NVD).

Impact

The successful exploitation of this vulnerability allows an attacker to bypass the XML sanitizer and achieve an XML External Entity (XXE) attack. This can lead to the disclosure of confidential data, denial of service, server-side request forgery, and port scanning from the perspective of the machine where the parser is located (OWASP XXE).

Mitigation and workarounds

The vulnerability has been fixed in PhpSpreadsheet versions 1.9.4, 2.1.3, 2.3.2, and 3.4.0. Users are strongly advised to upgrade to these patched versions to prevent potential XXE attacks (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-898v-775g-777cCRITICAL9.4
  • PHPPHP
  • neuron-core/neuron-ai
NoYesDec 09, 2025
GHSA-5j8p-438x-rgg5CRITICAL9.3
  • PHPPHP
  • onelogin/php-saml
NoYesDec 09, 2025
GHSA-j8g6-5gqc-mq36HIGH8.2
  • PHPPHP
  • neuron-core/neuron-ai
NoYesDec 09, 2025
GHSA-pvcv-q3q7-266gHIGH8.1
  • PHPPHP
  • filament/filament
NoYesDec 09, 2025
GHSA-6w82-v552-wjw2HIGH7.1
  • PHPPHP
  • shopware/shopware
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management