Description
Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Prior to 5.4.52, 6.4.40, 7.4.12, and 8.0.12, Crawler::addXmlContent() set DOMDocument::$validateOnParse = true before loadXML(), re-enabling external entity resolution and allowing attacker-supplied XML to expand file:// entities such as local files. This issue is fixed in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.
Published: 2026-07-14
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Symfony is a PHP framework and set of reusable PHP components for web and console applications. Before versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12, the DomCrawler::addXmlContent() method set DOMDocument::$validateOnParse to true before loading XML. This re‑enabled external entity resolution, allowing attacker‑supplied XML to expand file:// entities and read local files accessible to the PHP process. The vulnerability permits disclosure of any locally available files that the web server process can read, but does not allow code execution, representing a confidentiality violation (CWE‑611).

Affected Systems

This issue affects the symfony:dom-crawler and symfony:symfony packages in versions prior to 5.4.52, 6.4.40, 7.4.12, and 8.0.12. Users deploying these older releases of Symfony or its DomCrawler component are potentially impacted, including web applications, console scripts, and services that parse XML via addXmlContent() with untrusted data.

Risk and Exploitability

The CVSS score of 8.7 categorizes this flaw as high severity. EPSS indicates the likelihood of exploitation is very low (<1%), and the vulnerability is not listed in the CISA KEV catalog, suggesting that widespread targeted attacks have not yet been observed. The most common attack vector would be through a web or console interface that accepts XML input and passes it to addXmlContent() without further validation—especially if the application permits user‑supplied XML to be processed. An attacker could read files such as /etc/passwd or any file readable by the web server process, thereby exposing sensitive data. While no local privilege escalation or remote code execution is available, the impact on confidentiality and audit integrity can be significant for compromised applications.

Generated by OpenCVE AI on July 31, 2026 at 05:41 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Symfony and the DomCrawler component to at least version 5.4.52, 6.4.40, 7.4.12, or 8.0.12, as these releases disable external entity resolution in addXmlContent()
  • If an upgrade is infeasible, disable external entity resolution before calling loadXML by setting $dom->validateOnParse to false or by configuring PHP’s libxml settings (e.g., libxml_disable_entity_loader(true))
  • Avoid using addXmlContent() with untrusted XML, or sanitize the XML to strip out processing instructions and external entity declarations before parsing

Generated by OpenCVE AI on July 31, 2026 at 05:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DSA Debian DSA DSA-6312-1 symfony security update
Debian DSA Debian DSA DSA-6317-1 symfony security update
Github GHSA Github GHSA GHSA-x6g4-fwcc-jj8w Symfony has XXE (Local File Disclosure) in DomCrawler::addXmlContent() via validateOnParse = true
History

Mon, 27 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
First Time appeared Symfony
Symfony dom-crawler
Symfony symfony
Vendors & Products Symfony
Symfony dom-crawler
Symfony symfony

Thu, 16 Jul 2026 04:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 14 Jul 2026 19:45:00 +0000

Type Values Removed Values Added
Description Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Prior to 5.4.52, 6.4.40, 7.4.12, and 8.0.12, Crawler::addXmlContent() set DOMDocument::$validateOnParse = true before loadXML(), re-enabling external entity resolution and allowing attacker-supplied XML to expand file:// entities such as local files. This issue is fixed in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.
Title Symfony: XXE (Local File Disclosure) in DomCrawler::addXmlContent() via validateOnParse = true
Weaknesses CWE-611
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

Symfony Dom-crawler Symfony
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-15T14:21:08.891Z

Reserved: 2026-05-08T18:45:10.096Z

Link: CVE-2026-45071

cve-icon Vulnrichment

Updated: 2026-07-15T14:21:03.884Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T05:45:03Z

Weaknesses
  • CWE-611

    Improper Restriction of XML External Entity Reference