python-semver: Super-quadratic ReDoS in _LAST_NUMBER via attacker-controlled version strings
python-semver/python-semver is the Python Semantic Versioning library published on PyPI as semver. At src/semver/version.py:95 it defines: _LAST_NUMBER = re.compile(r"(?:[^\d](\d+)[^\d])+") The pattern is used by bump_build() to find and increment the last numeric component of a version string's build metadata. Its outer repeated group (?:[^\d](\d+)[^\d])+ contains two unbounded [^\d]* quantifiers plus \d+, and adjacent repetitions can consume the same run of non-digit characters. When the build metadata is a long alphabetic …