[Bounty $150] security: _multion — unauthenticated uid→user_id rebind + purchase-webhook trigger
Summary
plugins/_multion/router.py (mounted in plugins/main.py, reachable at the documented plugins-api.modal.run/multion URL) has two unauthenticated mutating endpoints:
POST /multion/submit_uid— writesredis: multion_user_id:<uid> = <user_id>from raw form fields. Anyone can rebind any Omi uid to any MultiOn user_id (or garbage), corrupting or hijacking the integration state.POST /multion?uid=— webhook invoked on conversation end; loads the bounduser_idand calls MultiOn's browse API with the app API key to add books to the bound Amazon cart. Attacker can fire purchases for any bound uid.
Combined exploit: attacker binds their own uid to a victim's MultiOn user_id via submit_uid (or corrupts a victim's binding outright), then their requests execute inside the victim's MultiOn/Amazon session — actions billed to and executed on the victim's account.
Same unauthenticated-mutation class as the mentor webhook fix (#13685) and the uid-as-auth sweep (#14446/#14451/#14453/#14455).
Fix
multion_auth.py shared-secret guard (Authorization: Bearer or multion_token query param → MULTION_WEBHOOK_SECRET env, hmac.compare_digest) applied via Depends() to both mutating endpoints. Fail-closed 503 unconfigured, 401 bad token. Read-only pages (/multion, /multion/callback, /multion/uid_input, check_setup_completion) stay open.
⚠️ Tradeoff flagged for maintainers: submit_uid is a user-facing setup form — gating it means the self-serve phone flow needs the secret injected (or routing through a trusted caller). Gating anyway is the correct fail-closed posture; scoping it back to only the webhook is a one-line revert if preferred.
PR with fix + tests follows. cc @kodjima33 @Git-on-my-level
Fix + regression tests: #14464
@josancamon19 @kodjima33 — fix is up and verified with regression tests; if this qualifies under the paid-bounty program I would be glad to take it on.
Hi — I've opened #20512 (https://github.com/BasedHardware/omi/pull/20512).
Disclosed: authored with AI assistance (Z.ai).
Claiming the $150 bounty on this issue.
Opened #23009 (clean branch cut directly from upstream main, three files only):
plugins/_multion/multion_auth.py— shared-secret guard: fail-closed 503 whenMULTION_WEBHOOK_SECRETis unset, 401 on missing/wrong token,Authorization: Bearerormultion_token,hmac.compare_digeston UTF-8 bytes.plugins/_multion/router.py— guard wired withDependson bothPOST /multion/submit_uidandPOST /multion; read-only pages untouched.plugins/_multion/test_multion_auth.py— 9 unit tests (503/401/accept paths, non-ASCII secret, AST wiring check), all passing locally.
I kept the submit_uid rollout tradeoff explicit in the PR body: the setup page needs the secret injected, or we drop the dependency there and gate only the purchase webhook. Happy to adjust to whichever posture the maintainers prefer.
Completion update on the $150 bounty for this issue.
#23009 is now fully green: PR Metadata Preflight succeeds after adding the required Failure-Class: none declaration to the PR body, there are 0 failing checks, and the PR is mergeable. The implementation and its 9 unit tests are unchanged.
Ready for maintainer review and merge. On the rollout tradeoff flagged in the PR: gating only the purchase webhook (leaving submit_uid open) or injecting MULTION_WEBHOOK_SECRET into the phone setup page are both one-line changes — happy to apply whichever posture you prefer.
Claiming the $150 bounty on completion of #23009; I will follow the contribution guide’s payment process (email after merge).
Hi Thanks again for reviewing and merging my PR. Just a quick note regarding the payment/sponsorship: The previous PayPal account I provided was a Mainland China region account, which unfortunately has strict cross-border restrictions and cannot receive international personal transactions. To make it easier for you, I have set up a new payment link via Ko-fi. You can now complete the payment using your Credit Card or an international PayPal account at: 👉 https://ko-fi.com/fengyuan_cn Please kindly process the transfer from this new link. Let me know if you encounter any issues during the checkout. Thanks for your support and time! Best regards FengYuan If you prefer other payment methods, please let me know and we can figure it out.God bless you for your help.