CVE-2026-140095
published high CVSS 4.0 · 8.7python-semver: super-quadratic ReDoS in _LAST_NUMBER via attacker-controlled version strings
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| python-semver | — | python-semver< 3.1.3 | Affected | Not stated | GitHub_M |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.7 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| python-semver | python-semver | < 3.1.3 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-1333 CWE-1333: Inefficient Regular Expression Complexity
References
3Provider assertions
1GitHub_M · cna
python-semver: super-quadratic ReDoS in _LAST_NUMBER via attacker-controlled version strings
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- cb08fca2a2ec35026fa971a2da3a70cf2f26940df36bcb0d1257087c4b53c8d7
- Ingested
- 30 Nov 2026, 22:23:52 UTC
- Source record
- Official CVE record