The vulnerability is a "Billion Laughs" attack within the Symfony YAML parser, where specially crafted YAML using recursive collection aliases can lead to exponential memory allocation and a denial of service. The root cause was the absence of a mechanism to limit the resolution of these aliases.
The analysis of the patch commit e77391b2e4f18821198f010d573674c8ed4a970a pinpoints the exact functions that were vulnerable. The fix involved introducing a new counter and limit for collection aliases via the ParserState::countAlias method. This new check was strategically placed within the functions responsible for resolving aliases, thereby identifying them as the source of the vulnerability.
The key vulnerable functions identified are Symfony\Component\Yaml\Parser::doParse, Symfony\Component\Yaml\Parser::parseValue, and Symfony\Component\Yaml\Inline::evaluateScalar. These functions are directly involved in the process of resolving YAML aliases. Before the patch, they would do so without any restrictions, allowing a small, malicious YAML input to expand into a very large data structure in memory. The entry point for triggering this condition is the Symfony\Component\Yaml\Parser::parse method (and its file-based counterpart), which orchestrates the entire parsing process. During an exploit, a runtime profiler would show these functions being called recursively, consuming system memory until exhaustion.