CVE-2025-67125 Details
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).
A signed integer overflow vulnerability has been identified in docopt.cpp version 0.6.2. The issue arises in the LeafPattern::match function within docopt_private.h, where occurrence counters are merged without proper overflow checks. This flaw can be exploited by seeding a counter with untrusted input that equals LONG_MAX, causing the first legitimate occurrence to trigger an overflow. The resulting negative or unbounded counter can bypass application logic that relies on occurrence limits or safety toggles. In addition, when docopt is built with certain sanitizers, this overflow can lead to a process abort, causing a denial-of-service condition.
It is recommended to use checked or saturated addition for merging occurrence counters, ensuring that any potential overflow is properly handled. Normalizing counters to eliminate negative values before processing can also help mitigate this issue.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 23, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://gist.github.com/thesmartshadow/672afe8828844c833f46f8ebe2f5f3bd | [email protected] | ExploitThird Party Advisory |
| https://github.com/docopt/docopt.cpp | [email protected] | Product |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-190 | Integer Overflow or Wraparound | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| docopt docopt.cpp | 0.6.2 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 11, 2026 | Initial Analysis | [email protected] |
| Jan 23, 2026 | CVE Modified | CISA-ADP |
| Jan 23, 2026 | New CVE Received | [email protected] |