Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
chatwoot-slack-oauth-state — Chatwoot v4.19.1 - High: 7.1 - Remote, one click - cross-tenant integration - Slack OAuth callback omits state and binds a tenant to an attacker workspace | Kitploit
Tools/GitHubGitHub/abraxas/chatwoot-slack-oauth-state
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityAuthenticationLabs & Practice
GitHubabraxas/chatwoot-slack-oauth-state

chatwoot-slack-oauth-state

Chatwoot v4.19.1 - High: 7.1 - Remote, one click - cross-tenant integration - Slack OAuth callback omits state and binds a tenant to an attacker workspace

View Repository
4 days agoNot yet reviewed
Share

Abraxas Labs - chatwoot-slack-oauth-state

chatwoot-slack-oauth-state

Chatwoot builds its Slack authorize URL without an OAuth state, and the callback redeems any code into whichever account the request is scoped to. An attacker who starts the flow against their own Slack workspace can hand the callback URL to a victim administrator and bind that tenant's support inbox to the attacker's Slack.

Class: OAuth state omission / account binding Reach: Remote, victim administrator interaction

Chatwoot v4.19.1 - caab07a8

IDno CVE yet
ClassOAuth state omission / account binding
ReachRemote, one click by a logged-in administrator
CWECWE-352
CVSSHigh: 7.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N
ProductChatwoot
Affectedv4.19.1 caab07a8f00032d5205b5a5d7e2eb0ba2f3d2d82
Authattacker needs a Slack workspace, not a Chatwoot account; the victim is a logged-in administrator
LicenseGNU Affero GPL v3.0
Labloopback Docker compose; the Slack token exchange is stubbed

Scope of proof. A real exchange needs a registered Slack app, so lab/slack_stub.rb replaces Slack::Web::Client#oauth_v2_access with a fixed attacker-workspace response. Everything Chatwoot does is real HTTP against the pinned build: the authorize URL it hands the browser, the redemption endpoint, the hook it stores, and the account the hook lands in. The vendor round-trip is simulated. The consequence for the victim tenant is inferred from the stored hook, not observed in Slack.

What an attacker can do

PrivilegeMethod / sinkRecon / integrity / availabilityLab-proven or inferred
Read the authorize URL the tenant is givenGET /api/v1/accounts/:id/integrations/appsReconLab-proven. state= absent
Have an arbitrary code redeemed into the tenantPOST /api/v1/accounts/:id/integrations/slack with {code}Integrity (tenant binding)Lab-proven, with the exchange stubbed
Bind the tenant to the attacker's Slack workspacestored Integrations::Hook.access_tokenIntegrityLab-proven. Stored token equals the attacker token
Enable the integration and receive its notificationsPATCH /integrations/hooks/:id {status: enabled}Integrity / confidentialityLab-proven that the hook enables; delivery inferred
Read new-conversation notifications, and with two_way reply into customer threadsSlack app eventsConfidentiality / integrityInferred from the integration design
Take over a tenant that already had Slack connectedallow_multiple_hooks: falseIntegrityInferred: the new hook replaces the tenant's own
Read Chatwoot conversations directlynonen/aClosed: the hook only carries Slack API scope

Stays closed on this leftover

AxisMethod / sinkWhy it is closed
ReconDirect Chatwoot data accessThe stored credential is a Slack bot token
IntegritySilent binding without the victimThe frontend route consumes ?code= in the victim's browser, so the victim must be logged in and open the link
IntegrityReplaying the same codeSlack codes are single-use; the stub does not model that
IntegrityBinding to a tenant the attacker cannot nameThe redirect URI is account-scoped and the POST needs that account in the path

How I found it

The integration catalog builds a button and an action for every app. Slack is special-cased:

# app/models/integrations/app.rb
when 'slack'
  client_id = GlobalConfigService.load('SLACK_CLIENT_ID', nil)
  "#{params[:action]}&client_id=#{client_id}&redirect_uri=#{self.class.slack_integration_url}"

slack_integration_url is "#{ENV['FRONTEND_URL']}/app/accounts/#{Current.account.id}/settings/integrations/slack". The account id is in the redirect URI, and it is the only thing that ties the callback to a tenant. There is no state, no nonce, no server-side record of who started the flow.

The controller then exchanges whatever code arrives:

def create
  hook_builder = Integrations::Slack::HookBuilder.new(
    account: Current.account, code: params[:code], inbox_id: params[:inbox_id]
  )
  @hook = hook_builder.perform
end

HookBuilder calls oauth_v2_access and stores the returned token on Current.account. The frontend page at the redirect URI reads props.code on mount and posts it. So the attack is: start OAuth against your own workspace, take the code Slack issues to your redirect, and send the victim .../settings/integrations/slack?code=<yours>. Their browser posts it with their session, and their tenant gets your workspace token.

The comparison is Linear, which is in the same file and does it correctly: encode_state mints a signed token carrying the account id, and the Linear callback decodes it. Slack has no equivalent.

Wrong turns: the Slack app only appears in the catalog when SLACK_CLIENT_SECRET is set, and db:chatwoot_prepare seeds blank SLACK_CLIENT_ID / SLACK_CLIENT_SECRET rows that shadow ENV, so the first lab run saw no Slack app at all. The seed now writes those rows and clears the config cache. The second was the stub itself: slack-ruby-client 2.7.0 defines Slack::Web as a module, not a class, so reopening it as a class crashes Rails at boot.

Lab

python3 chatwoot-slack-oauth-state-Abraxas-Labs.py

or:

cd lab
./run.sh

The lab asserts the authorize URL has no state, has the lab client_id, and carries the account-scoped redirect_uri; posts the attacker's code with the admin session; enables the hook; then reads the stored token out of the database through rails runner so the proof does not depend on any HTTP response.

IOC authorize_url=https://slack.com/oauth/v2/authorize?scope=commands,chat:write,...&client_id=lab-slack-client-id&redirect_uri=http://127.0.0.1:28230/app/accounts/1/settings/integrations/slack
IOC state_param_present=false redirect_uri=/app/accounts/1/settings/integrations/slack
IOC redeemed code='lab-attacker-issued-code' hook_id=1 status=False account=1
IOC stored_hook hook_id=1 account=1 status=enabled token='xoxb-lab-attacker-workspace'
IOC tenant_enabled=true hook_bound_to_attacker_workspace=true
SUCCESS CHATWOOT-F3-SLACK-OAUTH-STATE account=1 hook=1 state_absent=true redeemed_without_session=true stored_token=xoxb-lab-attacker-workspace xoxb-lab-attacker-workspace

run.sh tears the stack down on exit.

The fix

Generate a random state per initiation, store it server-side against the account and the initiating user, and require it back on the callback before exchanging the code. Linear's encode_state in the same file is the pattern. Reject a callback whose state is missing or does not match the account in the path.

References

  • chatwoot/chatwoot caab07a8f00032d5205b5a5d7e2eb0ba2f3d2d82
  • integrations/app.rb
  • integrations/slack_controller.rb
  • lib/integrations/slack/hook_builder.rb
  • CWE-352

License

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    524
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    478
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    357
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    317
  • 5

    estorides

    grisuno/estorides

    Aggregates 99+ free OSINT sources in parallel, resolves entities into a knowledge graph, and exports STIX 2.1, MISP, or GraphML with LLM-assisted analysis.

    305
  • 6

    opencti

    opencti-platform/opencti

    Open Cyber Threat Intelligence Platform

    275

Explore all tools

Browse our collection of tools

View all tools →