Research/chatwoot-hook-inbox-idor
0-dayNo CVEMediumPublic

Chatwoot, a hook on someone else's inbox

Chatwoot v4.19.1 lets an account administrator create an integration hook on another tenant's inbox by supplying that inbox id. The hook belongs to the attacker's account, forces the victim's new conversations to start pending, echoes the victim inbox name, and is invisible to the victim. Labbed. No CVE yet.

Name
Chatwoot, a hook on someone else's inbox
Type
0-day analysis
CVE
n/a
CVE Risk
medium
Disclosure Status
public
Vendor
Chatwoot
Affected
Chatwoot v4.19.1 caab07a8f00032d5205b5a5d7e2eb0ba2f3d2d82. Needs an administrator account on the instance and a target inbox id.
Published
13 Nov 2026
Updated
13 Nov 2026
Tags
0-day, chatwoot, rails, integrations, cwe-639, cwe-863, multi-tenant, authenticated

The field nobody compared

I am @abraxas_null. The proof of concept is on GitHub: abraxas/chatwoot-hook-inbox-idor (loopback client). The lab stack is lab/: Dockerfile, docker-compose.yml, run.sh, poc.py. Authorized lab only. It talks to loopback.

A hook is how Chatwoot connects an inbox to something outside itself: Dialogflow, a Slack channel, a webhook, an appointment scheduler. The hook records which inbox it serves. The create endpoint takes the owner from the session and the inbox from the request body. Nobody compares the two.

So an administrator of any workspace can post a hook that names a stranger's inbox. The row lands in the attacker's account, which means the victim cannot list it, cannot read it, and has no id to delete. The victim's inbox now reports an active bot, and every new conversation in that inbox opens as pending. The create response also hands back the victim inbox name and id.

This is Chatwoot v4.19.1 (caab07a8f00032d5205b5a5d7e2eb0ba2f3d2d82, 24 October 2026). No CVE yet. CWE-639 / CWE-863. 6.6 Medium (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:L). Medium because the attacker has to be an administrator somewhere and the direct damage is a workflow change. The scope change is real: the write crosses a tenant boundary and the victim cannot see it.

Why this one

I had already written up the agent-bot token, which is a read that crosses tenants. This one is the same mistake in a write, in a controller four lines long. After the token bug the useful question was whether Chatwoot validates a foreign id anywhere it accepts one, and the integrations controller is where that question has the most consequences, because a hook is a thing that acts on messages.

The integrations area is large. There are app hooks, Slack hooks, Dialogflow hooks, webhooks, and per-inbox bot status built on top of them. The controller that creates them is the one place where all of that starts.

The four lines

Plain text
def create
  @hook = Current.account.hooks.create!(permitted_params)
end

def permitted_params
  params.require(:hook).permit(:app_id, :inbox_id, :status, settings: {})
end

Current.account sets the owner, so the row is the attacker's. inbox_id is taken as given. The model has the matching pieces and never joins them:

Plain text
belongs_to :inbox, optional: true
validates :inbox_id, presence: true, if: -> { hook_type == 'inbox' }

The presence check fires only for inbox hooks, which is the Dialogflow shape, and it only asks that a number is there. Inbox#has_many :hooks, class_name: 'Integrations::Hook' is a plain inbox_id association with no account condition, so the victim's inbox now sees the foreign row as its own:

Plain text
def dialogflow_active?
  hooks.exists?(app_id: %w[dialogflow], status: 'enabled')
end

That predicate feeds Conversation#determine_conversation_status, which is what turns every new conversation in the victim's inbox to pending. An agent opening the queue finds new work waiting for a bot that is not theirs, and the bot does not exist in their account, so nothing picks the conversation up.

What the response gives back

_hook.json.jbuilder renders json.inbox resource.inbox&.slice(:id, :name). The attacker sent an id and gets a name. That turns the create endpoint into an inbox enumerator: an id that exists returns a name, an id that does not returns null. On a shared instance, ids are sequential, so a loop over a few hundred integers produces a tenant inventory. The lab prints inbox_name='Victim Support' to show the echo.

Wrong turns

The first assumption was that this also leaks message content. A Dialogflow hook forwards messages to a GCP project, so a hook in the attacker's account that the victim's inbox believes it owns looked like an exfiltration path. It is not.

HookListener#execute_hooks walks message.account.hooks, not message.inbox.hooks:

Plain text
def execute_hooks(message)
  return if message.private?

  message.account.hooks.each do |hook|
    next if hook.inbox_id.present? && hook.inbox_id != message.inbox_id
    ...

The hook lives in the attacker's account, so the victim's message never reaches it. That is a clean boundary and the lab keeps it as a closed axis rather than an overclaim. It also tells you how the bug survived review: the read path is scoped correctly, and only the write path is not.

The second assumption was that the victim would see the hook in their integrations list. They do not. The list is Current.account.hooks, and the row is not in their account. The lab counts both sides: victim sees zero Dialogflow hooks, attacker sees one.

What an attacker can do

Privilege Method / sink Recon / integrity / availability Lab-proven or inferred
Attach a hook to a foreign inbox POST /api/v1/accounts/:attacker/integrations/hooks with hook.inbox_id set to the victim inbox Integrity (cross-tenant config) Lab-proven
Read the victim inbox name and id the same response, hook.inbox Recon (tenant inventory) Lab-proven. inbox_name='Victim Support'
Force new victim conversations to start pending InboxBotStatus#dialogflow_active? Availability (workflow) Lab-proven. Status returns to open when the attacker deletes the hook
Hide the change from the victim the hook belongs to the attacker's account Integrity Lab-proven. Victim sees 0, attacker sees 1
Keep it in place the victim has no id to delete Availability Inferred from the same ownership split
Enumerate other tenants' inbox ids id probing against the create endpoint Recon Inferred; the response names an inbox only when the id exists
Read victim message content through the attacker's Dialogflow project HookListener#execute_hooks n/a Closed: the listener walks message.account.hooks

Stays closed

Axis Method / sink Why it is closed
Recon Direct inbox read InboxPolicy#show? is account-scoped; lab returns 401
Recon Message content to the attacker's bot HookListener filters on the message's own account
Integrity Moving or deleting the victim's own hooks Hook ids resolve through Current.account.hooks
Integrity Creating a hook in the victim's account Current.account.hooks.create! scopes the owner; only inbox_id escapes

The availability line is the part that matters operationally. A support queue that silently stops routing is worse than a loud failure, because the first sign is a customer complaining that nobody answered.

The lab

Two tenants, an inbox each, one contact in the victim tenant. The PoC creates a control conversation that must be open, creates the hook with the victim's inbox_id, checks the echoed name, proves the attacker still cannot read the victim inbox over HTTP, creates a second victim conversation that must now be pending, compares both tenants' integration views, then deletes the hook and confirms the queue recovers.

Plain text
IOC control_conversation status='open' inbox=1
IOC hook_created id=1 account_id=1 inbox_id=1 inbox_name='Victim Support' status=True
IOC control_victim_reads_own_inbox status=200
IOC control_attacker_reads_victim_inbox status=401
IOC victim_conversation_after_hook status='pending'
IOC victim_visible_dialogflow_hooks=0 attacker_visible_dialogflow_hooks=1
IOC after_attacker_cleanup status='open'
SUCCESS CHATWOOT-F4-HOOK-INBOX-IDOR attacker_account=1 victim_account=2 victim_inbox=1 hook=1 victim_conversation_status=pending victim_cannot_see_hook=true inbox_name='Victim Support' VICTIM-INBOX-NAME-LEAK

run.sh tears the stack down on exit. Two Chatwoot stacks fit an 8 GB Docker VM.

The fix

Validate the inbox against the account in the model, so every write path inherits it:

Plain text
validate :inbox_belongs_to_account

def inbox_belongs_to_account
  return if inbox.blank? || account_id.blank?
  return if inbox.account_id == account_id

  errors.add(:inbox_id, 'does not belong to this account')
end

The controller can keep its permit list. The model is the right layer because the next endpoint that accepts an inbox_id should not have to remember this check, and integrations_hooks has no foreign key on inbox_id to do the job at the database level. Adding that key would be the belt to go with the braces.

References

Abraxas Labs abraxaslabs.tech · github.com/abraxas · @abraxas_null · abraxas.null@proton.me