CVE-2026-140095

8.7High

Published Nov 30, 2026 · NVD status: Received · AI triage by gemini-3.1-flash-lite

8.7CVSS

High

0CVSS v4.010

Attack vector
Network
Complexity
Low
Privileges
None
User action
None
Impact
High impact on availability
Weakness
CWE-1333

What an attacker gets

Unauthenticated attackers can cause a denial of service by crashing the Python process. They trigger this by providing a crafted version string that forces the application into super-quadratic backtracking.

Root cause

A regular expression with ambiguous repeated quantifiers in the build identifier parsing logic leads to catastrophic backtracking.

Affected versions

python-semver versions prior to 3.1.3

CVSS v4.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/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

Fix & remediation

Upgrade to python-semver version 3.1.3 or later. If you cannot upgrade immediately, sanitize input strings to ensure build identifiers do not contain excessive non-digit characters.

remediation — bash
$ pip install --upgrade python-semver

AI-suggested. Run it in staging first and check it against the vendor advisory. Why?

NVD 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.

References

Source: nvd.nist.gov/vuln/detail/CVE-2026-140095

More fully triaged vulnerabilities you may want to check next.