Symfony: XXE (Local File Disclosure) in DomCrawler::addXmlContent() via validateOnParse = true
symfony · symfony dom-crawler
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| symfony/dom-crawler Packagist |
|
|
symfony · symfony dom-crawler
| Product | Affected | Fixed in |
|---|---|---|
| symfony/dom-crawler Packagist |
|
|
| symfony/symfony Packagist |
|
|
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.
From the CVE record · GitHub_M
Symfony’s Crawler::addXmlContent() re-enables external entity resolution when parsing XML. If an application processes attacker-supplied XML with this method, the attacker can cause file:// entities to expand local files; the input does not specify network access, authentication, or user-interaction requirements.
Check applications using affected versions of symfony/dom-crawler or symfony/symfony: below 5.4.52, 6.0.0–6.4.39, 7.0.0–7.4.11, or 8.0.0–8.0.11.