CVE-2026-45071: Symfony/symfony :addXmlContent() Vulnerability

LOW
Advisory Identifier: GHSA-x6g4-fwcc-jj8w
CWE-611
Published
Advisory Summary

CVE-2026-45071 is a LOW :addxmlcontent() vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Symfony/symfony libraries in the Packagist ecosystem. The issue involves :addxmlcontent() via validateonparse = true. Remediation is available by upgrading affected packages to version 8.0.12, 5.4.52, 6.4.40, 7.4.12.

CVE-2026-45071 at a Glance

CVE Identifier CVE-2026-45071
GHSA Identifier GHSA-x6g4-fwcc-jj8w
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Symfony/symfony
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-45071

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

symfony/symfony fixed: 8.0.12
Upgrade symfony/symfony to 8.0.12
symfony/dom-crawler fixed: 5.4.52
Upgrade symfony/dom-crawler to 5.4.52
symfony/symfony fixed: 5.4.52
Upgrade symfony/symfony to 5.4.52
symfony/dom-crawler fixed: 6.4.40
Upgrade symfony/dom-crawler to 6.4.40
symfony/dom-crawler fixed: 7.4.12
Upgrade symfony/dom-crawler to 7.4.12
symfony/dom-crawler fixed: 8.0.12
Upgrade symfony/dom-crawler to 8.0.12
symfony/symfony fixed: 6.4.40
Upgrade symfony/symfony to 6.4.40
symfony/symfony fixed: 7.4.12
Upgrade symfony/symfony to 7.4.12
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 symfony/symfony

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-45071, inspect your project dependencies for Symfony/symfony:

inspect dependencies for symfony/symfony

Analyze the terminal output to locate any version of Symfony/symfony in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.0.12), 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 Symfony/symfony, 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

### Description `symfony/dom-crawler` provides the `Crawler` class for navigating HTML/XML documents with CSS/XPath selectors; `symfony/browser-kit`'s `HttpBrowser` uses it to parse fetched pages. `Crawler::addXmlContent()` sets `DOMDocument::$validateOnParse = true` before calling `loadXML()`. Setting `validateOnParse` re-enables libxml's DTD subset processing, including external entity resolution, even though `LIBXML_NONET` is passed. `LIBXML_NONET` blocks **network** fetches but not `file://` entities. An attacker-supplied XML document with a `SYSTEM "file:///etc/passwd"` entity is therefore expanded. ### Resolution The `Crawler::addXmlContent` method does not set the `validateOnParse` flag anymore. The patch for this issue is available [here](https://github.com/symfony/symfony/commit/eea5fd7488cbdc241da4ce242344b7d9a3ecdf3d) for branch 5.4. ### Credits Symfony would like to thank Claude Mythos Preview (via Project Glasswing) for reporting the issue and providing the fix.

CVE-2026-45071 Affected Symfony/symfony Versions

8 component(s)
Fixed Versions:
8.0.125.4.526.4.407.4.12
Product / Package Ecosystem Affected Versions Fixed Version
symfony/symfony
Packagist
≥ 8.0.0
< 8.0.12
8.0.12
symfony/dom-crawler
Packagist
< 5.4.52
5.4.52
symfony/symfony
Packagist
< 5.4.52
5.4.52
symfony/dom-crawler
Packagist
≥ 6.0.0
< 6.4.40
6.4.40
symfony/dom-crawler
Packagist
≥ 7.0.0
< 7.4.12
7.4.12
symfony/dom-crawler
Packagist
≥ 8.0.0
< 8.0.12
8.0.12
symfony/symfony
Packagist
≥ 6.0.0
< 6.4.40
6.4.40
symfony/symfony
Packagist
≥ 7.0.0
< 7.4.12
7.4.12

References

Frequently Asked Questions

What is CVE-2026-45071?
CVE-2026-45071 is a security vulnerability in Symfony/symfony involving :addXmlContent() via validateOnParse = true under CWE-611: Improper Restriction of XML External Entity Reference.
Which Symfony/symfony versions are affected?
Affected versions include releases prior to 8.0.12, 5.4.52, 6.4.40, 7.4.12 across affected packages: symfony/symfony, symfony/dom-crawler.
What version fixes CVE-2026-45071?
Upgrading to 8.0.12, 5.4.52, 6.4.40, 7.4.12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is symfony/symfony affected?
Yes, symfony/symfony is affected in releases prior to 8.0.12, 5.4.52, 6.4.40, 7.4.12. Upgrade your dependency to 8.0.12, 5.4.52, 6.4.40, 7.4.12 or later.
Is symfony/dom-crawler affected?
Yes, symfony/dom-crawler is affected in releases prior to 5.4.52, 6.4.40, 7.4.12, 8.0.12. Upgrade your dependency to 5.4.52, 6.4.40, 7.4.12, 8.0.12 or later.
What CWE is associated with CVE-2026-45071?
CVE-2026-45071 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-2026-45071?
Run the dependency tree command: 'inspect dependencies for symfony/symfony'. 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-x6g4-fwcc-jj8w",
  "modified" : "2026-05-27T21:09:45Z",
  "published" : "2026-05-27T21:09:44Z",
  "aliases" : [ "CVE-2026-45071" ],
  "summary" : "Symfony has XXE (Local File Disclosure) in DomCrawler::addXmlContent() via validateOnParse = true",
  "details" : "### Description\n\n`symfony/dom-crawler` provides the `Crawler` class for navigating HTML/XML documents with CSS/XPath selectors; `symfony/browser-kit`'s `HttpBrowser` uses it to parse fetched pages.\n\n`Crawler::addXmlContent()` sets `DOMDocument::$validateOnParse = true` before calling `loadXML()`. Setting `validateOnParse` re-enables libxml's DTD subset processing, including external entity resolution, even though `LIBXML_NONET` is passed. `LIBXML_NONET` blocks **network** fetches but not `file://` entities. An attacker-supplied XML document with a `SYSTEM \"file:///etc/passwd\"` entity is therefore expanded.\n\n### Resolution\n\nThe `Crawler::addXmlContent` method does not set the `validateOnParse` flag anymore.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/eea5fd7488cbdc241da4ce242344b7d9a3ecdf3d) for branch 5.4.\n\n### Credits\n\nSymfony would like to thank Claude Mythos Preview (via Project Glasswing) for reporting the issue and providing the fix.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/dom-crawler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.4.52"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.4.52"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/dom-crawler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.4.40"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/dom-crawler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.4.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/dom-crawler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.0.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.4.40"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.4.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.0.12"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/security/advisories/GHSA-x6g4-fwcc-jj8w"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/commit/eea5fd7488cbdc241da4ce242344b7d9a3ecdf3d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/dom-crawler/CVE-2026-45071.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-45071.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/symfony/symfony"
  }, {
    "type" : "WEB",
    "url" : "https://symfony.com/cve-2026-45071"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-27T21:09:44Z",
    "nvd_published_at" : null
  }
}