# CVE-2026-140095: python-semver: super-quadratic ReDoS in \_LAST\_NUMBER via attacker-controlled version strings

- Priority: **Prioritise**
- Reason: Severe, CVSS 8.7 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)
- Next step: Check applicability: affected before 3.1.3 (CNA); fix release not confirmed
- Status: published
- Published: 2026-11-30 · Modified: 2026-12-03
- Aliases: GHSA-3qgw-g8j9-rcg4, DEBIAN-CVE-2026-140095, CGA-2xrh-pgc2-v7h8, CGA-86f2-86rv-4mv5, CGA-hqm6-p8m3-99xq, CGA-whvw-8g57-hfm4, CGA-2923-97g9-m786, CGA-6fcx-7rc8-xppm, CGA-72p8-3pvv-jmm5, CGA-7r5v-63fv-4jm9, CGA-g8gv-39p3-c3fv, CGA-gg24-2j8h-35q6, CGA-pm6j-hxhv-hv73, CGA-24qr-3phv-454v, CGA-2mpj-h96q-xv8q, CGA-2w8f-xxhx-m44q, CGA-3x4w-v453-74jq, CGA-4345-2x73-69x7, CGA-4w26-w4h3-p6x6, CGA-53rj-5chm-mc6q, CGA-59jq-cxq8-3qmf, CGA-6c3r-5f23-2vfp, CGA-6qhg-p7vg-mpwv, CGA-8724-xmg4-q8q9, CGA-8vpp-j8vq-m9jw, CGA-8xmg-32mr-pv9q, CGA-944c-pp57-2w74, CGA-99hm-xmhf-prgc, CGA-g48q-g3vw-cj8r, CGA-hm3v-52rw-rcr5, CGA-jh5f-g626-c2f4, CGA-jj57-7v5c-46vj, CGA-jm47-288v-38ch, CGA-jmmf-7pfh-xqx7, CGA-mggq-44h2-c32m, CGA-mwgp-hq3g-ccxh, CGA-p8r3-33g9-7622, CGA-q9rv-gh75-j783, CGA-qmh4-xccm-wfwj, CGA-r35p-ppwp-jqr9, CGA-rcqf-hhjv-46x2, CGA-v4p5-qm56-xwrp, CGA-vprp-qpv6-8wvf, CGA-w36p-pq63-cc6p, CGA-w5mp-4967-5q4p, CGA-wxx9-wx7j-3r54, CGA-x8m9-wq9h-w872, CGA-xcwj-r53m-3mjv, CGA-xgf8-8phx-2736, CGA-2jgf-qvw8-4wpv, CGA-38m3-95h4-crcw, CGA-3fj6-hcpj-5jwg, CGA-mjg7-x72m-fqh8, CGA-8rr5-jf4j-r968, CGA-prjj-247p-rhgx, UBUNTU-CVE-2026-140095, CGA-8563-84q3-r9v7, CGA-cjwm-439f-57h6, CGA-c2rc-hw6h-w6x7, CGA-gf7v-w7gw-fm4x, CGA-pjp2-gj32-6vw5, CGA-xr52-8gqx-h377, CGA-p3v6-5657-cm8f, CGA-phx9-5xm4-m5q3, CGA-qpxh-jf54-x5jg
- Record: https://cvemate.com/vulnerability/CVE-2026-140095 · JSON: https://cvemate.com/vulnerability/CVE-2026-140095/json

## Description

```text
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.
```

## Signals

- CVSS: 8.7 high (v4.0, CVE.org) 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
- EPSS: 0.861%, percentile 59.79%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 48)

- chainguard datadog-agent-7.78 (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.78-core-integrations (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.79 (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.79-core-integrations (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.80-core-integrations (Chainguard): All versions (No fix recorded) \| \< 7.80.4-r33
- chainguard datadog-agent-7.81 (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.81-core-integrations (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.82 (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.82-core-integrations (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.83 (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.83-core-integrations (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.84 (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.84-core-integrations (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.85 (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-7.85-core-integrations (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-fips-7.78 (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-fips-7.78-core-integrations (Chainguard): All versions (No fix recorded)
- chainguard datadog-agent-fips-7.79-core-integrations (Chainguard): All versions (No fix recorded) \| \< 7.79.2-r33
- chainguard datadog-agent-fips-7.80-core-integrations (Chainguard): All versions (No fix recorded) \| \< 7.80.4-r40
- chainguard datadog-agent-fips-7.81-core-integrations (Chainguard): All versions (No fix recorded)

## References

- <https://github.com/python-semver/python-semver/security/advisories/GHSA-3qgw-g8j9-rcg4>
- <https://github.com/python-semver/python-semver/commit/fbf1e8f21c050256579de9199e53b6807e49014a>
- <https://github.com/python-semver/python-semver/releases/tag/3.1.3>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-140095>
- <https://github.com/python-semver/python-semver>
- <https://security-tracker.debian.org/tracker/CVE-2026-140095>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/140xxx/CVE-2026-140095.json>
- <https://ubuntu.com/security/CVE-2026-140095>
- <https://www.cve.org/CVERecord?id=CVE-2026-140095>

---

Data as of 2026-12-05T03:54:48.268Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
