An attacker can crash the PHP process, or end the request with a fatal error, by sending one YAML document made of deeply nested inline lists or maps. The YAML parser's inline reader didn't apply the nesting limit the rest of the parser uses.

Who is affected

Any code that parses YAML from untrusted sources with symfony/yaml, also part of symfony/symfony. The Symfony advisory says that includes endpoints using #[MapRequestPayload] when the Yaml component is installed and the endpoint doesn't restrict acceptFormat. There, a single request with a YAML content type is enough, with no login needed. Apps that only parse their own YAML files, such as config, aren't exposed.

What to do

Update to 5.4.54, 6.4.45, 7.4.18 or 8.1.6. If you're on 8.0, move to 8.1. The fix makes the parser throw a ParseException once a document nests too deep.

Reported and fixed by Nicolas Grekas.