Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
2.3

CVE-2026-123824: Symfony Config may expose local file contents

CVE-2026-123824 · published 1 day ago
Summary

The Symfony Config component can read files on the server when processing certain XML data. This could let an attacker retrieve sensitive information stored on the system. Upgrade to the latest Symfony releases that disable this behavior or apply the provided security patches.

What to do
  • Update debian symfony to version 6.4.50+dfsg-0+deb13u1.
  • Update debian symfony to version 7.4.23+dfsg-1.
  • Update symfony config to version 5.4.56.
  • Update symfony config to version 6.4.50.
  • Update symfony config to version 7.4.23.
  • Update symfony config to version 8.1.11.
  • Update symfony symfony to version 5.4.56.
  • Update symfony symfony to version 6.4.50.
  • Update symfony symfony to version 7.4.23.
  • Update symfony symfony to version 8.1.11.
  • Update symfony symfony/config to version 5.4.56.
  • Update symfony symfony/config to version 6.4.50.
  • Update symfony symfony/config to version 7.4.23.
  • Update symfony symfony/config to version 8.1.11.
  • Update symfony symfony/symfony to version 5.4.56.
  • Update symfony symfony/symfony to version 6.4.50.
  • Update symfony symfony/symfony to version 7.4.23.
  • Update symfony symfony/symfony to version 8.1.11.
  • Update sensiolabs symfony to version 5.4.56 or later.
Affected software
Ecosystem VendorProductAffected versions
– sensiolabs symfony < 5.4.56
Debian:12 debian symfony All versions
Debian:13 debian symfony < 6.4.50+dfsg-0+deb13u1
Fix: upgrade to 6.4.50+dfsg-0+deb13u1
Debian:14 debian symfony < 7.4.23+dfsg-1
Fix: upgrade to 7.4.23+dfsg-1
Ubuntu:16.04:LTS canonical symfony All versions
composer symfony config < 5.4.56
>= 6.0.0, < 6.4.50
>= 7.0.0, < 7.4.23
>= 8.0.0, < 8.1.11
Fix: upgrade to 5.4.56
composer symfony symfony < 5.4.56
>= 6.0.0, < 6.4.50
>= 7.0.0, < 7.4.23
>= 8.0.0, < 8.1.11
Fix: upgrade to 5.4.56
Packagist symfony symfony/config < 5.4.56
>= 6.0.0, < 6.4.50
>= 7.0.0, < 7.4.23
>= 8.0.0, < 8.1.11
Fix: upgrade to 5.4.56
Packagist symfony symfony/symfony < 5.4.56
>= 6.0.0, < 6.4.50
>= 7.0.0, < 7.4.23
>= 8.0.0, < 8.1.11
Fix: upgrade to 5.4.56
Original advisory text
Symfony: XXE (Local File Read) in Config XmlUtils::parse() via validateOnParse = true
### 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 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.

**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.

### Resolution

The `$dom->validateOnParse = true;` line is removed. Nothing else changes: doctype rejection, schema validation and error reporting are untouched.

The 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.

The 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).

### Credits

Symfony would like to thank Prithiv Kumaravel (ProjectDiscovery) and Björn Meyer from Shopware AG for reporting the issue.
Fix within
Internet-facing 60 days
Internal At next upgrade
  • Not known to be exploited
  • Needs hands-on effort to exploit
  • Gives an attacker partial control
Severity
2.3 Low
Exploitation
<1% chance of attack within 30 days
Type
CWE-611XML External Entity (XXE)
Timeline
Published1 Dec 2026
Updated2 Dec 2026
First seen6 Nov 2026
Track software like this
Free during beta