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.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-1333"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/140xxx/CVE-2026-140095.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "3.1.3"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "fbf1e8f21c050256579de9199e53b6807e49014a"
}
],
"source": "REFERENCES_COMMIT"
},
{
"original_tag": "3.1.3",
"range": [
{
"fixed": "14091f72a17d152c68c7a543495276f516f32fc9"
}
],
"source": "REFERENCES_TAG"
}
]
}