Symfony: YAML Parser ReDoS via Catastrophic Backtracking in Parser::cleanup() Regex
symfony · symfony yaml
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| symfony/yaml Packagist |
|
|
symfony · symfony yaml
| 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, Symfony\Component\Yaml\Parser::cleanup() used regular expressions with overlapping quantifiers for YAML directive, comment, and document marker cleanup, allowing crafted input to make parsing hang for an arbitrarily long time. 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
Symfony’s YAML parser uses regular expressions that can hang for an arbitrarily long time when cleaning up crafted YAML input. An attacker who can supply YAML for parsing could cause a denial of service; the input does not specify network access, authentication requirements, or user interaction.
Teams using affected Packagist versions of symfony/yaml or symfony/symfony before 5.4.52, from 6.0.0 to before 6.4.40, from 7.0.0 to before 7.4.12, or from 8.0.0 to before 8.0.12 should check their installations.