Skip to content
KitploitKITPLOIT
ToolsBlog
Log in
Submit
ToolsBlog
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-sso-mfa-bypass — Chatwoot v4.19.1 - High: 8.1 - Remote - MFA bypass - SSO sign-in returns before the MFA gate | Kitploit
Tools/GitHubGitHub/abraxas/chatwoot-sso-mfa-bypass
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingAuthenticationLabs & Practice
GitHub
abraxas/chatwoot-sso-mfa-bypass

chatwoot-sso-mfa-bypass

Chatwoot v4.19.1 - High: 8.1 - Remote - MFA bypass - SSO sign-in returns before the MFA gate

View Repository
4 days agoNot yet reviewed
Share

Abraxas Labs - chatwoot-sso-mfa-bypass

chatwoot-sso-mfa-bypass

Chatwoot's SSO sign-in returns before the password path's MFA check. A valid sso_auth_token produces a full session for an MFA-enrolled user with no TOTP challenge, and skips enforced MFA enrolment on the same account. The password path on that account is gated, which is the control.

Class: Authentication bypass (MFA) Reach: Remote, holder of a valid SSO token

Chatwoot v4.19.1 - caab07a8

IDno CVE yet
ClassAuthentication bypass (MFA)
ReachRemote (any valid sso_auth_token)
CWECWE-287 / CWE-304
CVSSHigh: 8.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
ProductChatwoot
Affectedv4.19.1 caab07a8f00032d5205b5a5d7e2eb0ba2f3d2d82
Autha valid SSO token for the target user
LicenseGNU Affero GPL v3.0
Labloopback Docker compose; Postgres, Redis, Puma, Sidekiq

The precondition matters and it is why the score is not higher: the token is the thing the attacker must already hold. The bug is that holding it is enough. TOTP exists to stop exactly the case where the first factor is compromised, and on this path it is never asked for.

What an attacker can do

PrivilegeMethod / sinkRecon / integrity / availabilityLab-proven or inferred
Sign in as an MFA-enrolled user with no TOTPPOST /auth/sign_in {email, sso_auth_token}Integrity (session)Lab-proven. 200 plus usable headers
Skip enforced MFA enrolmentsame path for a user with no second factorIntegrity (policy)Lab-proven. 200, no mfa_setup_required
Reach any API the user can reachGET /api/v1/profile and beyondDepends on the userLab-proven for profile
Obtain the tokenOAuth callback, generate_sso_link, or an intercepted redirectReconInferred; the token is minted into a URL and lives five minutes
Escalate to super-admin toolingthe user's roleDepends on the userNot tested
Use an expired or random tokenMfa::TokenService / Redis lookupn/aClosed: lab returns 401 for a wrong token

Stays closed on this leftover

AxisMethod / sinkWhy it is closed
IntegrityPassword login without TOTPpassword_pre_auth_intercepted? returns 206 mfa_required
IntegrityPassword login without enrolment206 mfa_setup_required
IntegrityForged SSO tokenRedis-backed token lookup; 401
IntegritySAML users in enforced accountsmfa_enforcement_applies? exempts saml deliberately
ReconSession without a tokenThe SSO branch requires params[:sso_auth_token].present?

How I found it

The sessions controller is a sequence of early returns:

def create
  return handle_mfa_setup_verification if mfa_setup_verification_request?
  return handle_mfa_verification if mfa_verification_request?
  return handle_sso_authentication if sso_authentication_request?
  return if password_pre_auth_intercepted?

  super
end

password_pre_auth_intercepted? is the only caller of the MFA gate:

def password_pre_auth_intercepted?
  user = find_user_for_authentication
  return false unless user

  if user.mfa_enabled?
    handle_mfa_required(user)
    return true
  end
  ...
  if user.mfa_enforcement_pending?
    handle_mfa_setup_required(user)
    return true
  end
  ...
end

handle_sso_authentication returns two lines earlier. It calls authenticate_resource_with_sso_token, which calls create_token, sign_in and render_create_success directly. Nothing between the token check and the session asks about otp_required_for_login?.

The enforcement guard does exist, but it is wired to the wrong callback: MfaEnforcementGuard runs if: :authenticate_by_access_token?, so it covers token-authenticated API requests, not a fresh SSO login. mfa_enforcement_applies? also exempts only saml, which confirms that OAuth providers were meant to be in scope.

Wrong turns: I first expected the SSO path to 403 through the guard, and wrote the PoC to look for that. It returns 200 with access-token, client and uid headers. The lab now asserts the session is usable by calling GET /api/v1/profile and matching the email in the body, so a 200 that does not actually authenticate would fail.

Lab

python3 chatwoot-sso-mfa-bypass-Abraxas-Labs.py

or:

cd lab
./run.sh

One tenant with enforce_mfa = true and three administrators sharing a password: control@ (password login, MFA enrolled), oauth@ (OAuth provider, MFA enrolled), pending@ (OAuth provider, no MFA). run.sh mints the two SSO tokens with rails runner immediately before the PoC runs, because they expire after five minutes.

IOC control_password status=206 mfa_required=True
IOC control_pending_password status=206 mfa_setup_required=True
IOC control_bad_sso_token status=401
IOC mfa_enrolled_user_sso status=200 token_issued=true profile_status=200
IOC mfa_pending_user_sso status=200 enrolment_skipped=true profile_status=200
SUCCESS CHATWOOT-F5-SSO-MFA-BYPASS account=1 enforce_mfa=True control_password_mfa_required=true control_enrolment_required=true sso_mfa_enrolled_user_session=true sso_enrolment_skipped=true SSO-BYPASSES-MFA

run.sh tears the stack down on exit.

The fix

Run the MFA decision before the SSO branch, or inside handle_sso_authentication after the token resolves the user:

return handle_mfa_required(user) if user.mfa_enabled?
return handle_mfa_setup_required(user) if user.mfa_enforcement_pending?

Both paths should converge on sign_in_mfa_user after the second factor. The guard's authenticate_by_access_token? condition is the reason this slipped through, so the check belongs on the user, not on the callback that happens to run.

References

  • chatwoot/chatwoot caab07a8f00032d5205b5a5d7e2eb0ba2f3d2d82
  • devise_overrides/sessions_controller.rb
  • device_verification_guard.rb
  • mfa_enforcement_guard.rb
  • CWE-287 · CWE-304

License

GNU Affero GPL v3.0. See LICENSE. Loopback lab only. No warranty.

Abraxas Labs [email protected]

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.

    708
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    500
  • 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.

    398
  • 4

    redforge

    cybersecurity91/redforge

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

    341
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    259
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    257

Explore all tools

Browse our collection of tools

View all tools →