CVE-2015-3542: PHPExcel XXE Vulnerability - XML External Entity Injection Risk

phpoffice/phpexcel Updated 14 Dec 2025

Summary

07/11/2024
Yes i
High
8.7

CVE-2015-3542: PHPExcel XXE Vulnerability. Affects phpoffice/phpexcel versions < 1.8.1. Fixed in 1.8.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

PHPExcel is a popular open-source library for reading and writing spreadsheet files in PHP. It allows developers to create, read, and manipulate Excel files in various formats. The library is widely used in applications that require data export and import functionalities. However, it has been found to be vulnerable to XML External Entity (XXE) attacks, which can lead to unauthorized access to sensitive data and system resources.

Vulnerability Detail

The XXE vulnerability in PHPExcel arises from improper handling of XML input. Attackers can exploit this flaw by crafting malicious XML documents that include external entities. When PHPExcel processes these documents, it may inadvertently disclose sensitive information from the server or perform unauthorized actions. This vulnerability is classified under CWE-611, which pertains to improper restriction of XML external entity reference. The potential ramifications include data leakage, denial of service, and further exploitation of the underlying system.

How To Fix

Minimum fixed version

1.8.1

This is the first release that contains the fix.

composer require phpoffice/phpexcel:1.8.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate upgrading is not feasible, a temporary workaround is to disable the loading of external entities in the XML parser. This can be done by modifying the XML loading settings in your code. Here is an example of how to do this in PHP:

libxml_disable_entity_loader(true);

This setting should be applied before loading any XML data with PHPExcel.

Conclusion

The PHPExcel XXE vulnerability (CVE-2015-3542) poses significant risks to applications using this library. It is crucial for developers to update to the patched version (1.8.1 or later) to mitigate these risks. For those unable to upgrade immediately, implementing the suggested workaround can provide temporary protection.

See every vulnerability recorded for phpoffice/phpexcel →

Share this vulnerability

FAQ

XXE (XML External Entity) vulnerability allows attackers to interfere with the processing of XML data, potentially leading to data exposure or system compromise.

You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to analyze your composer.lock file.

Consequences can include unauthorized access to sensitive files, denial of service, and the ability to execute arbitrary code on the server.

Yes, you can disable external entity loading in the XML parser as a temporary workaround until you can upgrade.

You can find more information about PHPExcel on its official GitHub repository or documentation site.

Related vulnerabilities

Recent vulnerabilities recorded for phpoffice/phpexcel.

How To Fix

Minimum fixed version

1.8.1

This is the first release that contains the fix.

composer require phpoffice/phpexcel:1.8.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback