The vulnerability stems from two main issues: 1) Uncontrolled alias expansion in decoding logic, and 2) Lack of depth limits in parser state management. The commit adds three key protections: alias ratio scaling in decode.go's unmarshal, flow level limits in yaml_parser_increase_flow_level, and indentation depth checks in yaml_parser_roll_indent. These functions directly correspond to the CWE-400 resource consumption vectors described - alias abuse (memory) and deep nesting (CPU). The pre-patch versions of these functions lacked the constraints shown in the diff (max_flow_level, max_indents, and dynamic alias ratio calculation), making them the vulnerable entry points.