CVE-2026-140095

Source
https://cve.org/CVERecord?id=CVE-2026-140095
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-140095.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-140095
Aliases
  • GHSA-3qgw-g8j9-rcg4
Published
2026-11-30T22:15:01Z
Modified
2026-12-01T00:00:09Z
Severity
  • 8.7 (High) CVSS_V4 - 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 CVSS Calculator
Summary
python-semver: super-quadratic ReDoS in _LAST_NUMBER via attacker-controlled version strings
Details

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.

Database specific
{
    "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"
}
References

Affected packages

Git / github.com/python-semver/python-semver

Affected ranges

Type
GIT
Repo
https://github.com/python-semver/python-semver
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Fixed
Database specific
Show details
{
    "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"
        }
    ]
}

Affected versions

2.*
2.10.0
2.10.2
2.11.0
2.12.0
2.13.0
2.4.1
2.4.2
2.5.0
2.6.0
2.7.0
2.7.1
2.7.2
2.7.3
2.7.4
2.7.5
2.7.6
2.7.7
2.7.8
2.7.9
2.8.0
2.8.1
2.9.0
2.9.1
3.*
3.0.0
3.0.0-dev.1
3.0.0-dev.2
3.0.0-dev.3
3.0.0-dev.4
3.0.1
3.0.2
3.0.3
3.0.4
3.1.0
3.1.1
3.1.2

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-140095.json"