Skip to content

security: shipbob: eight routes trust body uid and act with the victim's ShipBob token #14666

Closed

Description

@onkar717

Summary

Every chat-tool route in plugins/omi-shipbob-app/main.py takes uid from the request body, calls get_shipbob_headers(uid) / make_shipbob_request(uid, ...), and acts on that user's connected ShipBob account, with no caller authentication:

Route Line Action
POST /tools/get_inventory 625 read inventory levels
POST /tools/get_products 685 read product catalog
POST /tools/create_wro 729 create a warehouse receiving order
POST /tools/get_wros 885 read receiving orders
POST /tools/cancel_wro 942 cancel a receiving order
POST /tools/get_orders 982 read orders + customer data
POST /tools/get_fulfillment_centers 1044 read fulfillment centers
POST /select-channel 601 change the active channel binding

Each handler does uid = _clean_str(body.get("uid")) and then get_shipbob_headers(uid) (main.py:141), which returns {"Authorization": f"Bearer {tokens['access_token']}"} for that uid's stored token. There is no shared-secret guard, no Depends, and no *_tools_auth.py in the app. Anyone who can reach the service and knows (or guesses) a uid can read another user's orders and customer data, cancel their receiving orders, or create WROs under their account.

Same defect class as the merged whoop fix (#14453), the five-app sweep (#14455), twitter-chat-tools (#14451), and zapier (#14428). ShipBob is not in any of those file lists.

Impact

  • Data exposure: /tools/get_orders returns order records including customer-facing order data. /tools/get_inventory and /tools/get_products expose the victim's catalog and stock.
  • Destructive write: /tools/cancel_wro cancels a victim's warehouse receiving order, /tools/create_wro files new ones under their account, and /select-channel repoints their active channel.

These are the same externally reachable chat-tool routes whose uid-trust was accepted and paid on whoop (#14453) and zapier (#14428). ShipBob exposes the identical surface with no additional guard.

Evidence

Hermetic reproduction (stdlib only, framework and sibling modules stubbed, drives the real tool_get_orders). An attacker request carrying only {"uid": "<victim>"}, with no Authorization header and no secret:

outbound call : GET https://api.shipbob.com/1.0/order
outbound hdrs : Authorization: Bearer VICTIM-SHIPBOB-ACCESS-TOKEN
returned      : **Recent Orders (1)** - Order #VICTIM-ORDER-1 - Processing (2026-09-01)

The handler attached the victim's stored token and returned the victim's orders, selected entirely by the body uid.

Fix

Per-app shipbob_tools_auth.py shared-secret guard: Authorization: Bearer or a shipbob_tools_token query param, checked against the SHIPBOB_TOOLS_SECRET env var with hmac.compare_digest, applied via Depends() to all eight routes. Fail-closed 503 when unconfigured, 401 on missing or wrong token. Same mechanism as the merged mentor precedent (plugins/basic/mentor_webhook_auth.py) and #14455.

Bounty

Per the Contribution guide ("If there are no paid bounties available, you can suggest your own"), proposing US$200 for this fix plus regression tests, in line with the per-app security fixes already paid (#14453, #14451). PR with fix + tests follows.

cc @josancamon19 @kodjima33

Activity

  1. changed the title [-][Bounty $200] security: shipbob — eight routes trust body uid and act with the victim's ShipBob token[/-] [+][Bounty $200] security: shipbob: eight routes trust body uid and act with the victim's ShipBob token[/+] on Sep 19, 2026
  2. moved this from Someday to In progress in omi TODO / bountieson Sep 19, 2026
  3. changed the title [-][Bounty $200] security: shipbob: eight routes trust body uid and act with the victim's ShipBob token[/-] [+]security: shipbob: eight routes trust body uid and act with the victim's ShipBob token[/+] on Sep 19, 2026
  4. moved this from In progress to In review in omi TODO / bountieson Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions