{"id":"UBUNTU-CVE-2025-67125","details":"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).","modified":"2026-05-20T16:23:42.475489297Z","published":"2026-01-23T16:15:00Z","upstream":["CVE-2025-67125"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2025-67125"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2025-67125"},{"type":"REPORT","url":"https://gist.github.com/thesmartshadow/672afe8828844c833f46f8ebe2f5f3bd"},{"type":"REPORT","url":"https://github.com/docopt/docopt.cpp"}],"affected":[{"package":{"name":"docopt.cpp","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/docopt.cpp?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.2-2"],"ecosystem_specific":{"binaries":[{"binary_name":"libdocopt0","binary_version":"0.6.2-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-67125.json"}},{"package":{"name":"docopt.cpp","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/docopt.cpp?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.2-2","0.6.2-2build1"],"ecosystem_specific":{"binaries":[{"binary_name":"libdocopt0","binary_version":"0.6.2-2build1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-67125.json"}},{"package":{"name":"docopt.cpp","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/docopt.cpp?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.2-2.1","0.6.2-2.3"],"ecosystem_specific":{"binaries":[{"binary_name":"libdocopt0","binary_version":"0.6.2-2.3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-67125.json"}},{"package":{"name":"docopt.cpp","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/docopt.cpp?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.2-2.4","0.6.3-4","0.6.3-4build1"],"ecosystem_specific":{"binaries":[{"binary_name":"libdocopt0","binary_version":"0.6.3-4build1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-67125.json"}},{"package":{"name":"docopt.cpp","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/docopt.cpp?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.3-5"],"ecosystem_specific":{"binaries":[{"binary_name":"libdocopt0","binary_version":"0.6.3-5"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-67125.json"}},{"package":{"name":"docopt.cpp","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/docopt.cpp?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.6.3-5","0.6.3-5build1"],"ecosystem_specific":{"binaries":[{"binary_version":"0.6.3-5build1","binary_name":"libdocopt0"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-67125.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L"},{"type":"Ubuntu","score":"medium"}]}