{"id":"CVE-2026-140095","summary":"python-semver: super-quadratic ReDoS in _LAST_NUMBER via attacker-controlled version strings","details":"python-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.","aliases":["GHSA-3qgw-g8j9-rcg4"],"modified":"2026-12-01T00:00:09.432698330Z","published":"2026-11-30T22:15:01.996Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/140xxx/CVE-2026-140095.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-1333"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/140xxx/CVE-2026-140095.json"},{"type":"FIX","url":"https://github.com/python-semver/python-semver/commit/fbf1e8f21c050256579de9199e53b6807e49014a"},{"type":"WEB","url":"https://github.com/python-semver/python-semver/releases/tag/3.1.3"},{"type":"ADVISORY","url":"https://github.com/python-semver/python-semver/security/advisories/GHSA-3qgw-g8j9-rcg4"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-140095"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/python-semver/python-semver","events":[{"introduced":"0"},{"fixed":"14091f72a17d152c68c7a543495276f516f32fc9"},{"fixed":"fbf1e8f21c050256579de9199e53b6807e49014a"}],"database_specific":{"extracted_events":[{"source":"AFFECTED_FIELD","strategy":"StringRangeExpression","range":[{"introduced":"0"},{"fixed":"3.1.3"}]},{"source":"REFERENCES_COMMIT","range":[{"fixed":"fbf1e8f21c050256579de9199e53b6807e49014a"}]},{"original_tag":"3.1.3","range":[{"fixed":"14091f72a17d152c68c7a543495276f516f32fc9"}],"source":"REFERENCES_TAG"}]}}],"versions":["3.1.2","3.1.1","3.1.0","3.0.4","3.0.3","3.0.2","3.0.1","3.0.0","3.0.0-dev.4","3.0.0-dev.3","3.0.0-dev.2","3.0.0-dev.1","2.13.0","2.12.0","2.11.0","2.10.2","2.10.0","2.9.1","2.9.0","2.8.1","2.8.0","2.7.9","2.7.8","2.7.7","2.7.6","2.7.5","2.7.4","2.7.3","2.7.2","2.7.1","2.7.0","2.6.0","2.5.0","2.4.2","2.4.1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-140095.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"}]}