{"id":"XE-0093","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"157","source_url":"https://github.com/xeprotocol/xe/issues/157","reporter_id":32,"title":"Multisig threshold bypass on non-spending operations","area":null,"claimed_tier":"high","assessed_tier":null,"verdict":"duplicate","duplicate_of":"XE-0068","tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"closed","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-10-29T13:57:25.966000+00:00","updated_at":"2026-11-10T00:11:29.481005+00:00","source_created_at":"2026-10-29T02:43:14+00:00","told_at":"2026-11-05T22:06:00+00:00","status_changed_at":"2026-11-05T22:05:50.632096+00:00","url":"https://bounty.xe.network/XE-0093","body":"# Multisig threshold bypass on non-spending operations\n\n## Summary\n\nOne member of a threshold multisig account can unilaterally execute every\nnon-spending operation — `lease_accept`, `lease_cancel`, `lease_force_settle`,\n`lease_settle` — because the credential check routes non-spending block types\nto `VerifyMultisigAny` (first valid signature wins) instead of the threshold\ncheck. Only fund-out operations (send, burn, lease, renew, multisig open /\nupdate, mint) enforce the threshold.\n\n## Impact\n\nA single rogue member of a threshold multisig provider account can bind the\nshared account to serve a lease (accept), cancel it, force-settle it, or\nsettle it, against the will of the other members. For `lease_accept`, this\nlocks the shared account's XUSD stake into escrow and commits it to a service\nobligation. This is encumbrance plus settlement control, not direct theft:\nfund-out operations still require the full threshold.\n\nSuggested program tier: **High** (privilege escalation).\n\n## Root cause\n\n- `core/ledger.go` `verifyBlockCredential`: when a block carries signatures,\n  spending operations go to `VerifyMultisig` (threshold enforced); everything\n  else goes to `VerifyMultisigAny`.\n- `core/multisig.go` `IsSpendingOp`: only send, burn, lease, renew,\n  multisig_open, multisig_update, and mint return true. `lease_accept`,\n  `lease_cancel`, `lease_force_settle`, and `lease_settle` are not spending\n  operations.\n- `core/multisig.go` `VerifyMultisigAny`: returns success on the first\n  signature that verifies against any keyset member. The threshold is ignored.\n\n## Proof of concept\n\nTarget: `xeprotocol/xe` @ `978785929bc17a2f4ab30c383e5fc9cf4d634512`\n(2026-10-15). The harness runs against the real `core` and `store` packages\nvia a replace directive; the repository itself is not modified.\n\nAttached PoCs: `pocs/harness-slice1-main.go.txt` (byte-identical copy of the\nrunnable harness; the accept case is the `C1` section) and\n`pocs/harness-f01-legs-main.go.txt` (byte-identical copy of the harness for\nthe remaining three legs).\n\nRun (Go 1.25.14):\n\n```\nexport PATH=\"$HOME/.local/go/bin:$PATH\"\ncd harness-slice1\nGOPROXY=off go run .\ncd ../harness-f01-legs\nGOPROXY=off go run .\n```\n\nObserved output (verbatim, accept leg):\n\n```\n1-of-3 accept (threshold 2) AddBlock err=<nil>\nlease state after 1-sig accept: accepted (expected accepted if bypass)\n1-of-3 send (threshold 2) AddBlock err=multisig: insufficient signatures: got 1, need 2 (expect threshold error)\n```\n\nObserved output (verbatim, remaining legs):\n\n```\ncancel outsider-sig AddBlock err=multisig: no valid signature from any keyset member (expect failure)\ncancel 1-sig (threshold 2) AddBlock err=<nil>\nlease state after 1-sig cancel: cancelled\nforce-settle 1-sig (threshold 2) AddSyncedBlock err=<nil>\nlease state after 1-sig force-settle: unfulfilled\npending after force-settle: <nil> (nil = deleted)\naccept 1-sig (threshold 2) AddBlock err=<nil>\nsettle 1-sig (threshold 2) AddSyncedBlock err=<nil>\nlease state after 1-sig settle: settled\nprovider XE before=0 after=80000 (expected +80000)\n```\n\nSo a threshold-2 multisig account accepted, cancelled, force-settled, and\nsettled leases on one member's signature alone, while the same single\nsignature on a send was correctly rejected — and an outsider's signature on\nthe cancel was correctly rejected, proving the single-member success is\nsignature-based, not an absent check.\n\n## Reproduction steps\n\n1. Open a threshold-2 multisig account (members k1, k2).\n2. Craft a `lease_accept` block for a lease offered to that account, signed by\n   k1 only.\n3. Submit via `AddBlock` / API / gossip. Observed: accepted.\n\n## Recommended fix\n\nRoute all multisig-account operations through `VerifyMultisig` (threshold),\nor document explicitly which operations are intentionally single-signature\nand why.\n\n## Severity\n\n- CVSS 3.1: 6.5 — `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N`\n- CWE-862 (Missing Authorization)\n\n## Caveats\n\n- All four legs (accept, cancel, force-settle, settle) have now been\n  executed end to end with one member's signature on a threshold-2 account.\n  The force-settle and settle legs used `AddSyncedBlock` (skipSkew) solely\n  to satisfy their attestation time windows inside a test; the credential\n  check under test runs first on both the normal and sync paths,\n  identically.\n- No public prior report of this threshold-routing mechanism was found\n  (dedup queries recorded in the audit's DEDUP-BASELINE.md).\n- This reproduction runs against the repository code at the stated HEAD. No\n  testnet transactions were sent as part of this report.\n\nPayout address (XE): eff2c51dd8457df740b919226cd9b37a2944e5abea7501094db80234f87f010e\n\nBest,\nChaplin\n\n[harness-slice1-main.go.txt](https://github.com/user-attachments/files/34109858/harness-slice1-main.go.txt)\n[harness-f01-legs-main.go.txt](https://github.com/user-attachments/files/34109857/harness-f01-legs-main.go.txt)","patch_refs":[{"id":209,"repo":"xeprotocol/xe","kind":"pr","ref":"209","title":"fix(core): enforce multisig threshold on lease operations and guard signer keys (fixes #157)","url":"https://github.com/xeprotocol/xe/pull/209","note":"","state":"open","author":"NePreby","added_by":"desk","created_at":"2026-10-29T17:47:11.564074+00:00"}],"thread":[{"id":354,"source":"github","source_ref":"6670767730","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as https://bounty.xe.network/XE-0068, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, reply with what differs and we will look again.","created_at":"2026-11-05T22:06:00+00:00"}]}