# CVE-2025-67125: A signed integer overflow in docopt.cpp v0.6.2 (LeafPattern::match in docoptprivate.h) when merging occurrence counters (e.g., default LONG…

- Severity: Medium 4.4 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-01-23T00:00:00.000Z
- Modified: 2026-06-17T09:57:27.937Z
- Weaknesses: CWE-190
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: mitre

## Description

A signed integer overflow in docopt.cpp v0.6.2 (LeafPattern::match in docopt_private.h) when merging occurrence counters (e.g., default LONG_MAX + first user "-v/--verbose") can cause counter wrap (negative/unbounded semantics) and lead to logic/policy bypass in applications that rely on occurrence-based limits, rate-gating, or safety toggles. In hardened builds (e.g., UBSan or -ftrapv), the overflow may also result in process abort (DoS).

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- docopt docopt.cpp: 0.6.2

## References

- <https://gist.github.com/thesmartshadow/672afe8828844c833f46f8ebe2f5f3bd> (exploit, third-party-advisory)
- <https://github.com/docopt/docopt.cpp> (product)

## Sources

- CVE List: [CVE-2025-67125](https://www.cve.org/CVERecord?id=CVE-2025-67125), CVE Terms of Use, modified 2026-01-23
- NVD: [CVE-2025-67125](https://nvd.nist.gov/vuln/detail/CVE-2025-67125), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-67125 · Whole record: https://cve.day/CVE-2025-67125.json · Rebuilt by cve.day 2026-11-25T22:59:10.840Z
