Symfony: [Yaml] Harden the parser when handling untrusted input
symfony
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| symfony/yaml Packagist |
|
|
symfony
| Product | Affected | Fixed in |
|---|---|---|
| symfony/yaml 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, when the parser is exposed to attacker-controlled input, deeply nested mappings or sequences cause both the block-level (Parser::parseBlock()) and inline (Inline::parseSequence() / Inline::parseMapping()) parsers to recurse without a depth limit. A crafted document exhausts the PHP stack and crashes the worker. 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
The Symfony YAML parser has no depth limit for deeply nested mappings or sequences. When an application parses attacker-controlled YAML, a crafted document can exhaust the PHP stack and crash the worker.
Check applications using Packagist symfony/yaml or symfony/symfony versions below 5.4.52, from 6.0.0 to below 6.4.40, from 7.0.0 to below 7.4.12, or from 8.0.0 to below 8.0.12.