Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. phpoffice/math
  4. ›
  5. CVE-2025-48882

CVE-2025-48882: PHPOffice Math allows XXE when processing an XML file in the MathML format

May 29, 2025 (updated May 30, 2025)

Product: Math Version: 0.2.0 CWE-ID: CWE-611: Improper Restriction of XML External Entity Reference CVSS vector v.4.0: 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N) CVSS vector v.3.1: 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) Description: An attacker can create a special XML file, during which it processed, external entities are loaded, and it’s possible to read local server files. Impact: Local server files reading Vulnerable component: The loadXML function with the unsafe LIBXML_DTDLOAD flag, the MathML class Exploitation conditions: The vulnerability applies only to reading a file in the MathML format. Mitigation: If there is no option to refuse using the LIBXML_DTDLOAD flag, it’s recommended to filter external entities through the implementation of the custom external entity loader function. Researcher: Aleksandr Zhurnakov (Positive Technologies)

References

  • github.com/PHPOffice/Math
  • github.com/PHPOffice/Math/commit/fc31c8f57a7a81f962cbf389fd89f4d9d06fc99a
  • github.com/PHPOffice/Math/security/advisories/GHSA-42hm-pq2f-3r7m
  • github.com/advisories/GHSA-42hm-pq2f-3r7m
  • nvd.nist.gov/vuln/detail/CVE-2025-48882

Code Behaviors & Features

Detect and mitigate CVE-2025-48882 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.3.0

Fixed versions

  • 0.3.0

Solution

Upgrade to version 0.3.0 or above.

Weakness

  • CWE-611: Improper Restriction of XML External Entity Reference

Source file

packagist/phpoffice/math/CVE-2025-48882.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 19 Aug 2025 12:19:51 +0000.