CVE-2026-45071: Symfony/symfony :addXmlContent() Vulnerability
LOWCVE-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
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.
Upgrade symfony/symfony to 8.0.12
Upgrade symfony/dom-crawler to 5.4.52
Upgrade symfony/symfony to 5.4.52
Upgrade symfony/dom-crawler to 6.4.40
Upgrade symfony/dom-crawler to 7.4.12
Upgrade symfony/dom-crawler to 8.0.12
Upgrade symfony/symfony to 6.4.40
Upgrade symfony/symfony to 7.4.12
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
CVE-2026-45071 Affected Symfony/symfony Versions
8 component(s)| 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?
Which Symfony/symfony versions are affected?
What version fixes CVE-2026-45071?
Is symfony/symfony affected?
Is symfony/dom-crawler affected?
What CWE is associated with CVE-2026-45071?
How can I check Packagist dependencies for CVE-2026-45071?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}