CVE-2026-140095: python-semver · Super-quadratic ReDoS in _LAST_NUMBER via attacker-controlled version strings
Affects dvcSource GCVE Database
Not known to be exploited · CVSS 8.7 High : upgrade to 3.67.1_21 soon.
Data as of 4 Dec 2026, 20:14 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 4.0 | 8.7 |
|---|
- Patch
- Available – fixed in 3.67.1_21, 3.1.3
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 30 Nov 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 4 Dec 2026.
What to do
Upgrade dvc to 3.67.1_21; semver to 3.1.3.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewdvcpkg:brew/dvcOther threats | Affected
| Fixed in
|
PyPIsemverpkg:pypi/semverOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available in python-semver version 3.67.1_21 that fixes the vulnerable regex pattern. Users should upgrade to this fixed version to eliminate the ReDoS vulnerability. Until patched, avoid calling bump_build() on untrusted version strings with long alphabetic build metadata. Input validation or length restrictions on build metadata may mitigate the issue but upgrading is the recommended solution.
Description
python-semver version 3.1.0 contains a Regular Expression Denial of Service (ReDoS) vulnerability in the _LAST_NUMBER regex used by the bump_build() method. This regex exhibits super-quadratic catastrophic backtracking when processing long build metadata strings composed entirely of letters without digits. An attacker can supply a crafted semantic version string with a long alphabetic build identifier, causing the bump_build() operation to consume excessive CPU time, potentially blocking processing for many seconds or minutes. The vulnerability is confirmed in the latest release and master branch as of the report date and is fixed in version 3.67.1_21. The CVSS 4.0 score is 8.7 (high severity).
References
- github.com/python-semver/python-semver/security/advisories/GHSA-3qgw-g8j9-rcg4 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-140095 (opens in a new tab)
- github.com/python-semver/python-semver/commit/fbf1e8f21c050256579de9199e53b6807e49014a (opens in a new tab)
- github.com/python-semver/python-semver (opens in a new tab)
- github.com/python-semver/python-semver/releases/tag/3.1.3 (opens in a new tab)