{"id":"CVE-2026-123824","aliases":["CVE-2026-123824","GHSA-5jff-8h8q-r5qx"],"related":[],"kind":"vulnerability","state":"published","title":"Symfony: XXE (Local File Read) in Config XmlUtils::parse() via validateOnParse = true","summary":"The Symfony Config component XmlUtils::parse() enables DTD validation before rejecting documents that carry a doctype, allowing XML external entity (XXE) injection in Symfony versions prior to 5.4.56, 6.x prior to 6.4.50, 7.x prior to 7.4.23, and 8.x prior to 8.1.11. A remote attacker who can supply XML to this method can determine whether local files exist, cause a denial of service, and, in some configurations, exfiltrate local file content via a crafted XML document whose doctype declares an external file:// entity.\nXmlUtils::parse() sets $dom->validateOnParse = true before calling loadXML() and only rejects documents carrying a doctype afterwards. Enabling DTD validation makes libxml resolve external entities during loadXML(), and LIBXML_NONET blocks http:// but not file://, so a file:// entity is read from disk before the doctype rejection runs. The content of the file is not returned to the caller, but the distinct libxml error for a missing path reveals whether a file exists, and an entity pointing at a large or slow file causes a denial of service. If the application registers a network-capable stream wrapper such as s3://, a parameter entity can also send the content of a local file to an external server. This is the same issue as CVE-2026-45071, which was fixed in the DomCrawler component but not in Config.\n\nApplications are affected if they pass untrusted XML to XmlUtils::parse() directly. The Symfony components that call it process developer-provided or operator-configured sources, such as configuration files and the XLIFF documents fetched by the translation providers.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The Symfony Config component XmlUtils::parse() enables DTD validation before rejecting documents that carry a doctype, allowing XML external entity (XXE) injection in Symfony versions prior to 5.4.56, 6.x prior to 6.4.50, 7.x prior to 7.4.23, and 8.x prior to 8.1.11. A remote attacker who can supply XML to this method can determine whether local files exist, cause a denial of service, and, in some configurations, exfiltrate local file content via a crafted XML document whose doctype declares an external file:// entity.\nXmlUtils::parse() sets $dom->validateOnParse = true before calling loadXML() and only rejects documents carrying a doctype afterwards. Enabling DTD validation makes libxml resolve external entities during loadXML(), and LIBXML_NONET blocks http:// but not file://, so a file:// entity is read from disk before the doctype rejection runs. The content of the file is not returned to the caller, but the distinct libxml error for a missing path reveals whether a file exists, and an entity pointing at a large or slow file causes a denial of service. If the application registers a network-capable stream wrapper such as s3://, a parameter entity can also send the content of a local file to an external server. This is the same issue as CVE-2026-45071, which was fixed in the DomCrawler component but not in Config.\n\nApplications are affected if they pass untrusted XML to XmlUtils::parse() directly. The Symfony components that call it process developer-provided or operator-configured sources, such as configuration files and the XLIFF documents fetched by the translation providers.","source":"cvelist"},{"lang":"en","text":"### Description\n\n`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.\n\nThis 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.\n\nThe 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:\n\n```\n[ERROR 77] Premature end of data in tag root line 2 (in file:///.../invalid.xml - line 3, column 1)\n[ERROR 85] chunk is not well balanced (in file:///.../invalid.xml - line 3, column 1)\n[ERROR 26] Entity 'xxe' failed to parse\n```\n\nlibxml 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.\n\n**Impact depends on the stream wrappers.** The doctype check throws `XmlParsingException` with a fixed message, so the DOM never reaches the caller. But the external entities are resolved before that check. A parameter entity can read a local file through `php://filter` and put its content into the URL of a second external entity. `LIBXML_NONET` blocks `http://`, so PHP's built-in wrappers give that URL no way out. A network-capable stream wrapper registered by the application, such as `s3://`, does: the content of the file then leaves the server. On every setup, an attacker also gets a file-existence oracle from the distinct libxml error on a missing path, and a denial of service vector by pointing the entity at a large or slow file.\n\n**Reachability is limited.** The callers of `XmlUtils::parse()` in Symfony itself (the XML loaders of DependencyInjection, Routing, Validator and Serializer, `XliffFileLoader` and `QtFileLoader`) consume developer-provided configuration and translation files, which are trusted input; the Loco, Crowdin and Lokalise translation providers feed it the XLIFF documents fetched from the operator-configured service. The exposure is applications that pass untrusted XML to `XmlUtils::parse()` directly, which its string-accepting signature permits. The severity is rated low on that basis, matching the rating of CVE-2026-45071.\n\n### Resolution\n\nThe `$dom->validateOnParse = true;` line is removed. Nothing else changes: doctype rejection, schema validation and error reporting are untouched.\n\nThe flag was dead weight independently of the security question. It can only act on a document carrying a doctype, which this method rejects unconditionally three lines later, so validation could never legitimately succeed. On every doctype-less document, meaning every valid Symfony configuration file, it merely produced a spurious `Validation failed: no DTD found !` entry in the libxml error buffer. Schema validation is a separate concern handled through the `$schemaOrCallable` argument and never relied on this flag.\n\nThe patches for this issue are available [here](https://github.com/symfony/symfony/commit/334ef21a6039355c05b123e7df60699be0e28da3) for branch 5.4 (and forward-ported to 6.4, 7.4, 8.1 and 8.2).\n\n### Credits\n\nSymfony would like to thank Prithiv Kumaravel (ProjectDiscovery) and Björn Meyer from Shopware AG for reporting the issue.","format":"markdown","source":"ghsa"}],"published":"2026-11-06T17:19:24.750Z","modified":"2026-12-01T23:15:05.104Z","severity":{"scorer":"Checkmarx","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","score":2.3,"rating":"LOW"},"severities":[{"scorer":"Checkmarx","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","score":2.3,"rating":"LOW"},{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","score":6.3,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","rating":"LOW"}],"cwes":["CWE-611"],"affected":[{"ranges":[{"type":"git","introduced":"0","fixed":"5.4.56","status":"affected"},{"type":"git","introduced":"6.0.0","fixed":"6.4.50","status":"affected"},{"type":"git","introduced":"7.0.0","fixed":"7.4.23","status":"affected"},{"type":"git","introduced":"8.0.0","fixed":"8.1.11","status":"affected"}],"vendor":"sensiolabs","product":"symfony","package":"symfony/config","repo":"https://github.com/symfony/config","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.4.56"}],"ecosystem":"Packagist","package":"symfony/config","purl":"pkg:composer/symfony/config","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0","status":"affected","fixed":"6.4.50"}],"ecosystem":"Packagist","package":"symfony/config","purl":"pkg:composer/symfony/config","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.4.23"}],"ecosystem":"Packagist","package":"symfony/config","purl":"pkg:composer/symfony/config","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.1.11"}],"ecosystem":"Packagist","package":"symfony/config","purl":"pkg:composer/symfony/config","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.4.56"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0","status":"affected","fixed":"6.4.50"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.4.23"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.1.11"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"}],"references":[{"url":"https://github.com/symfony/symfony/security/advisories/GHSA-5jff-8h8q-r5qx","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/symfony/commit/334ef21a6039355c05b123e7df60699be0e28da3","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-123824","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/config/CVE-2026-123824.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-123824.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony/releases/tag/v5.4.56","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony/releases/tag/v6.4.50","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony/releases/tag/v7.4.23","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony/releases/tag/v8.1.11","tags":["web"],"sources":["ghsa"]}],"credits":["Prithiv Kumaravel from ProjectDiscovery","Björn Meyer from Shopware AG","Nicolas Grekas"],"assigner":"Checkmarx","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-06T20:28:48.074Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-123824","url":"https://www.cve.org/CVERecord?id=CVE-2026-123824","licence":"CVE Terms of Use","modified":"2026-11-06T20:29:12.981Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5jff-8h8q-r5qx","url":"https://github.com/advisories/GHSA-5jff-8h8q-r5qx","licence":"CC-BY-4.0","modified":"2026-12-01T23:15:05.104Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-123824","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-123824","licence":"Public domain","modified":"2026-11-06T21:40:43.450Z"}],"updatedAt":"2026-12-01T23:37:06.237Z","epss":{"score":0.00272,"percentile":0.20966,"date":"2026-12-01T12:00:22.000Z"}}