CVE-2015-3542: Phpoffice/phpexcel PHPExcel XXE Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-3m9x-2qfj-xvq4
CWE-611
Published
Advisory Summary

CVE-2015-3542 is a HIGH phpexcel xxe vulnerability vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Phpoffice/phpexcel libraries in the Packagist ecosystem. The issue involves phpexcel xxe vulnerability. Remediation is available by upgrading affected packages to version 1.8.1.

CVE-2015-3542 at a Glance

CVE Identifier CVE-2015-3542
GHSA Identifier GHSA-3m9x-2qfj-xvq4
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Phpoffice/phpexcel
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2015-3542

To remediate this vulnerability, upgrade all affected Phpoffice/phpexcel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

phpoffice/phpexcel fixed: 1.8.1
Upgrade phpoffice/phpexcel to 1.8.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for phpoffice/phpexcel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2015-3542, inspect your project dependencies for Phpoffice/phpexcel:

inspect dependencies for phpoffice/phpexcel

Analyze the terminal output to locate any version of Phpoffice/phpexcel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.8.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Phpoffice/phpexcel, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

PHPExcel XXE Vulnerability

CVE-2015-3542 Affected Phpoffice/phpexcel Versions

1 component(s)
Fixed Versions:
1.8.1
Product / Package Ecosystem Affected Versions Fixed Version
phpoffice/phpexcel
Packagist
< 1.8.1
1.8.1

References

Frequently Asked Questions

What is CVE-2015-3542?
CVE-2015-3542 is a security vulnerability in Phpoffice/phpexcel involving PHPExcel XXE Vulnerability under CWE-611: Improper Restriction of XML External Entity Reference.
Which Phpoffice/phpexcel versions are affected?
Affected versions include releases prior to 1.8.1 across affected packages: phpoffice/phpexcel.
What version fixes CVE-2015-3542?
Upgrading to 1.8.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is phpoffice/phpexcel affected?
Yes, phpoffice/phpexcel is affected in releases prior to 1.8.1. Upgrade your dependency to 1.8.1 or later.
What CWE is associated with CVE-2015-3542?
CVE-2015-3542 is classified under CWE-611: Improper Restriction of XML External Entity Reference (The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.).
How can I check Packagist dependencies for CVE-2015-3542?
Run the dependency tree command: 'inspect dependencies for phpoffice/phpexcel'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3m9x-2qfj-xvq4",
  "modified" : "2024-11-07T17:28:59Z",
  "published" : "2024-11-07T17:28:59Z",
  "aliases" : [ "CVE-2015-3542" ],
  "summary" : "PHPExcel XXE Vulnerability",
  "details" : "PHPExcel XXE Vulnerability",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phpoffice/phpexcel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.8.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/PHPOffice/PHPExcel/commit/0ab614fd952f82f9b7a9280731daa2300e6b000c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/phpoffice/phpexcel/CVE-2015-3542.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/PHPOffice/PHPExcel"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-07T17:28:59Z",
    "nvd_published_at" : null
  }
}