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).
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | docopt.cpp | No fix yet | — |
| Debian 13 | docopt.cpp | No fix yet | — |
| Debian 12 | docopt.cpp | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | docopt.cpp | No fix yet | — |
| Ubuntu 26.04 LTS | docopt.cpp | No fix yet | — |
| Ubuntu 25.10 | docopt.cpp | No fix yet | — |
| Ubuntu 24.04 LTS | docopt.cpp | No fix yet | — |
| Ubuntu 22.04 LTS | docopt.cpp | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | docopt.cpp | No fix yet | — |
| Ubuntu 18.04 LTS | docopt.cpp | No fix yet | — |