The vulnerability is a Regular Expression Denial of Service (ReDoS) in the semver package, triggered when parsing range strings with excessive whitespace. The analysis of the provided commit patches (e.g., 717534ee353682f3bcf33e60a8af4292626d4441 for modern versions, and backports like d4530b8c9785923be4ebaa01324c48549acb0856 for older monolithic semver.js) shows that the vulnerability affected functions responsible for parsing version and range strings. The primary vulnerable function, as stated in the advisory, is new Range (the Range constructor). Other functions like Range.prototype.parseRange, Comparator constructor, Comparator.prototype.parse, SemVer constructor, and coerce were also vulnerable because they used the same inefficient regular expressions or lacked sufficient input sanitization for whitespace before regex processing. The patches mitigate this by introducing aggressive whitespace normalization at the beginning of constructors and by replacing vulnerable regexes (referred to as re) with safer versions (safeRe) that use bounded quantifiers for whitespace, thus preventing catastrophic backtracking.