Chatwoot, the SMS webhook anyone can call
Chatwoot v4.19.1 takes unauthenticated Bandwidth SMS callbacks. The path number is ignored and the body chooses the channel, so anyone who can reach the instance can create contacts, conversations and customer messages in a tenant's SMS inbox. The fix shipped as #16546 and was reverted by #16577. Labbed. No CVE yet.
- Name
- Chatwoot, the SMS webhook anyone can call
- Type
- 0-day analysis
- CVE
- n/a
- CVE Risk
- high
- Disclosure Status
- public
- Vendor
- Chatwoot
- Affected
- Chatwoot v4.19.1 caab07a8f00032d5205b5a5d7e2eb0ba2f3d2d82, and current develop. Needs an SMS inbox with a known phone number.
- Published
- 13 Nov 2026
- Updated
- 13 Nov 2026
- Tags
- 0-day, chatwoot, rails, sms, webhook, cwe-306, unauthenticated
The fix was reverted
I am @abraxas_null. The proof of concept is on GitHub: abraxas/chatwoot-sms-webhook-unauth (loopback client). The lab stack is lab/: Dockerfile, docker-compose.yml, run.sh, poc.py. Authorized lab only. It talks to loopback.
A support team publishes a phone number. Texts to that number land in Chatwoot as conversations. The piece that receives them is an HTTP endpoint with no authentication on it, and the request decides which company's inbox gets the message. Anyone who knows the number can write into that queue as a customer. They can also make up the customer's phone number, so the agent sees a text from a stranger who never sent one.
There was a fix. It was merged, then reverted, and the revert is what shipped in the release I tested.
This is Chatwoot v4.19.1 (caab07a8f00032d5205b5a5d7e2eb0ba2f3d2d82, 24 October 2026). No CVE yet. CWE-306 / CWE-345. 7.5 High (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).
Why this one
The agent-bot bug I wrote up yesterday came from a view that skipped a presenter. This one is the opposite shape: a controller that is small enough to be correct by inspection, and is not. Six lines, no filters, and a job behind it that trusts the request body over the URL.
I read every controller under app/controllers/webhooks/ in one pass and checked each for a before_action. WhatsApp and Twilio have signature checks. Line has a channel secret. Telegram compares a token. The SMS one has nothing.
The six lines
class Webhooks::SmsController < ActionController::API
def process_payload
Webhooks::SmsEventsJob.perform_later(params['_json']&.first&.to_unsafe_hash)
head :ok
end
endThe route is post 'webhooks/sms/:phone_number' (config/routes.rb:724). The :phone_number segment is never read. The job takes the body and finds the channel itself:
SUPPORTED_EVENTS = %w[message-received message-delivered message-failed].freeze
def perform(params = {})
return unless SUPPORTED_EVENTS.include?(params[:type])
channel = Channel::Sms.find_by(phone_number: params[:to])
return unless channel
process_event_params(channel, params)
endSo the URL is decoration and the body is the routing key. message-received goes to Sms::IncomingMessageService, which builds the contact, the conversation and an inbound message. message-delivered and message-failed go to Sms::DeliveryStatusService, which rewrites delivery state by source id.
The revert
git log on the file is the interesting part. A fix landed as #16546, "fix(webhooks): authenticate bandwidth sms callbacks", and was undone by commit 4893b4919, "revert: fix(webhooks): authenticate bandwidth sms callbacks (#16577)". The revert is in the tag I pinned and in develop at the time of the review. The pre-revert spec is still the best documentation of the callback shape, and the lab uses it.
I am not going to guess why it was reverted. What I can say is that the code that shipped accepts unauthenticated callbacks, and the release notes do not mention a replacement control.
Wrong turns
My first PoC posted a JSON object:
{"type": "message-received", "to": "+15550001111", "message": {"from": "...", "text": "..."}}The controller read nothing. Rails wraps a non-hash JSON body under _json; a hash body is merged into params as its own keys, so params['_json'] is nil. Bandwidth posts an array, so the correct shape is:
[{"type": "message-received", "to": "+15550001111", "message": {"id": "...", "from": "...", "text": "..."}}]The lab posts a bare array, and it posts it to /webhooks/sms/00000000000 while the body names +15550001111. That is deliberate: the path number is a different string from the channel, and the message still lands. It is the clearest way to show which half of the request the server believes.
The second wrong turn was assuming the job needed a real Bandwidth message id. It does not. message-received takes any id; the service uses it as source_id on the message.
What an attacker can do
No account, no token, no signature. The only input is a phone number, and support numbers are published on purpose.
| Privilege | Method / sink | Recon / integrity / availability | Lab-proven or inferred |
|---|---|---|---|
| Create a contact and conversation in the tenant | POST /webhooks/sms/:phone_number with _json[0].to |
Integrity | Lab-proven |
| Choose the sender phone number the agent sees | _json[0].message.from |
Integrity | Lab-proven. Two identities accepted |
| Fill the inbox with attacker-written customer messages | same, repeated | Availability (queue pollution) | Lab-proven |
| Trigger automation rules and bots on the fake message | message_created listeners |
Integrity | Inferred from source |
| Send outbound SMS to attacker-chosen numbers through an automation | Channel::Sms send path |
Integrity, and cost | Inferred from source |
| Rewrite delivery state of a real outbound message | _json[0].type=message-failed with a known message.id |
Integrity (reporting) | Inferred from source |
| Read the tenant's conversations or contacts | none | n/a | Not reachable from this sink |
Stays closed
| Axis | Method / sink | Why it is closed |
|---|---|---|
| Recon | Reading tenant data | The callback only writes; the response is head :ok |
| Recon | Enumerating inboxes | A body to that matches no channel is a silent no-op |
| Integrity | WhatsApp, Twilio, Line, Telegram inbound | Each verifies a signature or token |
| Integrity | Sending as an agent | POST /conversations/:id/messages still needs a session |
The availability line is the one I would watch in production. Two conversations is a lab artefact. A loop is a queue full of invented customers, and the agents have to triage all of it.
The lab
Postgres 16 with pgvector, Redis 7, Puma and Sidekiq from chatwoot/chatwoot:v4.19.1. The seed creates one tenant with a Bandwidth SMS inbox on +15550001111. The PoC logs in as the tenant administrator to read the result back, then posts two arrays with no credentials at all.
IOC victim account=1 sms=+15550001111 conversations_before=0
IOC unauthenticated_post status=200 path_number=00000000000 body_to=+15550001111
IOC conversation_id=1 status=open inbox_id=1
IOC message_id=1 type=0 sender_phone=+15559990000 content='SMS-INJECTED-WITNESS'
IOC second_injection conversation=2 sender=+15557770000
SUCCESS CHATWOOT-F2-SMS-WEBHOOK account=1 inbox=1 path_number_ignored=true conversation=1 message=1 witness=SMS-INJECTED-WITNESS SMS-INJECTED-WITNESSThe admin login is only there to observe. Remove it and the two POSTs still land.
The fix
Bring back #16546: authenticate the callback with the per-channel Bandwidth credentials, or verify the provider's signature. A single instance-wide secret is the wrong shape here, because the body selects the tenant, so the credential has to be per channel. If the revert happened because #16546 broke a deployment, the answer is a configurable per-channel secret, not an open endpoint.
References
- chatwoot/chatwoot
caab07a8f00032d5205b5a5d7e2eb0ba2f3d2d82 sms_controller.rbsms_events_job.rb- Revert commit
4893b4919 - CWE-306 · CWE-345
Abraxas Labs abraxaslabs.tech · github.com/abraxas · @abraxas_null · abraxas.null@proton.me