Symfony: XXE (Local File Read) in Config XmlUtils::parse() via validateOnParse = true
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| sensiolabssymfony |
< 5.4.56→ 5.4.56 ≥ 6.0.0, < 6.4.50→ 6.4.50 ≥ 7.0.0, < 7.4.23→ 7.4.23 ≥ 8.0.0, < 8.1.11→ 8.1.11 |
5.4.56 6.4.50 7.4.23 8.1.11 |
| composersymfony/config |
< 8.1.11→ 8.1.11 |
8.1.11 |
| composersymfony/symfony |
< 8.1.11→ 8.1.11 |
8.1.11 |
| Packagistsymfony/config |
≥ 8.0.0, < 8.1.11→ 8.1.11 |
8.1.11 |
| Packagistsymfony/symfony |
≥ 8.0.0, < 8.1.11→ 8.1.11 |
8.1.11 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Debian DEBIAN-CVE-2026-123824 symfony Fix available
- Ubuntu UBUNTU-CVE-2026-123824 symfony No fixed version in this record
Original description The description as published by the source.
Description
Symfony\Component\Config\Util\XmlUtils::parse() sets $dom->validateOnParse = true immediately before calling loadXML(), and only rejects documents carrying a doctype afterwards. Enabling DTD validation makes libxml load and process the doctype during loadXML(), which includes resolving external entities. LIBXML_NONET blocks http:// but not file://, so a file:// entity is read from disk before the doctype rejection can run.
This is the same defect as CVE-2026-45071 (GHSA-x6g4-fwcc-jj8w), which removed the flag from Crawler::addXmlContent() in the DomCrawler component. The occurrence in the Config component was not addressed at the time.
The clearest evidence is what libxml reports when the referenced file is not well formed on its own, since the errors are attributed to that file:
[ERROR 77] Premature end of data in tag root line 2 (in file:///.../invalid.xml - line 3, column 1)
[ERROR 85] chunk is not well balanced (in file:///.../invalid.xml - line 3, column 1)
[ERROR 26] Entity 'xxe' failed to parse
libxml can only produce those by opening and reading the file. Isolating the flag confirms it directly: with validateOnParse = true, an entity pointing at a readable file yields its content in the DOM, and one pointing at a missing path yields failed to load external entity "file:///...". With the flag off, neither happens.
Impact depends on the stream wrappers. The doctype check throws XmlParsingException with a fixed me…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- package github.com
- web github.com
- web github.com
- web packagist.org
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com