Skip to main content
VulnerabilityPublished

CVE-2026-140095: python-semver · Super-quadratic ReDoS in _LAST_NUMBER via attacker-controlled version strings

Affects snapcraftSource GCVE Database

0
Compare
Authoritative record:CVE-2026-140095· High 8.7

Not known to be exploited · CVSS 8.7 High : upgrade to 9.2.1_2 or 7.5.0 soon.

Data as of 4 Dec 2026, 18:37 UTC

CVSS 4.0 base score
8.7High
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 4.08.7
EPSS
0.8% chance of exploitation in 30 days – higher than 59% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 9.2.1_2, 7.5.0, 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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 30 Nov 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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 snapcraft to 9.2.1_2 or 7.5.0; semver to 3.1.3.

Affected software

ProductAffectedFixed in
Homebrewsnapcraftpkg:brew/snapcraftOther threatsAffected
  • >=7.1.4 <7.5.0
  • >=8.12.0 <9.2.1_2
Fixed in
  • 7.5.0
  • 9.2.1_2
PyPIsemverpkg:pypi/semverOther threatsAffected
  • <3.1.3
Fixed in
  • 3.1.3

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 and should be applied. The vulnerability is fixed in snapcraft versions 7.5.0 and 9.2.1_2. Users should upgrade to these or later versions to remediate the issue. Until patched, avoid processing untrusted version strings with long alphabetic build metadata using the vulnerable bump_build() method.

Description

python-semver version 3.1.0 and master HEAD contain a super-quadratic Regular Expression Denial of Service (ReDoS) vulnerability in the _LAST_NUMBER regex used by the bump_build() method. This flaw allows an attacker to supply a long alphabetic build metadata string without digits, causing catastrophic backtracking and significant CPU consumption during version parsing and incrementing. The vulnerability is exploitable via the public API semver.Version.parse(version_string).bump_build() with attacker-controlled version strings. Versions 7.1.4 through before 7.5.0 and 8.12.0 through before 9.2.1_2 of the snapcraft product are also affected, with fixes available in 7.5.0 and 9.2.1_2.

References

Community reviews

Loading reviews…