CVE-2026-140095
HIGH 8.7CVSS 4.0python-semver: super-quadratic ReDoS in _LAST_NUMBER via attacker-controlled version strings
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.
- Published
- 30 Nov 2026
- Last modified
- 3 Dec 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Received
- Weakness
- CWE-1333
- Also known as
- GHSA-3qgw-g8j9-rcg4
- Sources
- NVDJSONCVE ListJSONOSV GHSA-3qgw-g8j9-rcg4JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | HIGH 8.7 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| CVE List | GitHub_M | CVSS 4.0 | HIGH 8.7 | 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 |
| OSV | GitHub | CVSS 4.0 | 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 | |
| CVE List | CISA-ADP | SSVC | Exploitation: poc; Automatable: yes; Technical Impact: partial |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| CVE List | python-semver | python-semver | = < 3.1.3 | |
| OSV | PyPI | semver | < 3.1.3 | 3.1.3 |
References
- https://github.com/python-semver/python-semver/commit/fbf1e8f21c050256579de9199e53b6807e49014a · x_refsource_MISC, WEB
- https://github.com/python-semver/python-semver/releases/tag/3.1.3 · x_refsource_MISC, WEB
- https://github.com/python-semver/python-semver/security/advisories/GHSA-3qgw-g8j9-rcg4 · x_refsource_CONFIRM, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-140095 · ADVISORY
- https://github.com/python-semver/python-semver · PACKAGE
History
- 3 Dec 2026 17:56 UTC · NVD: 1 reference added
- 3 Dec 2026 16:56 UTC · CVE List: updated (other details)
- 1 Dec 2026 20:28 UTC · OSV: first stored (published 1 Dec 2026)
- 30 Nov 2026 23:42 UTC · NVD: first stored (published 30 Nov 2026)
- 30 Nov 2026 22:30 UTC · CVE List: first stored (published 30 Nov 2026)