CVE-2026-140095

NameCVE-2026-140095
Descriptionpython-semver is a Python package for working with Semantic Versioning. Prior to 3.1.3, semver.Version.parse accepted an arbitrarily long alphabetic BUILD_IDENTIFIER and bump_build passed it through _increment_string to Version._LAST_NUMBER in src/semver/version.py. The expression contained ambiguous repeated non-digit quantifiers around a required digit run, causing super-quadratic backtracking when no digit was present and allowing an attacker-controlled valid version string to monopolize the Python process and deny service. This issue is fixed in version 3.1.3.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
python-semver (PTS)bookworm2.10.2-3vulnerable
trixie3.0.2-1vulnerable
forky, sid3.0.2-2vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
python-semversource(unstable)(unfixed)

Notes

https://github.com/python-semver/python-semver/security/advisories/GHSA-3qgw-g8j9-rcg4
Fixed by: https://github.com/python-semver/python-semver/commit/fbf1e8f21c050256579de9199e53b6807e49014a (3.1.3)

Search for package or bug name: Reporting problems