/

CVE-2026-53595

Severity:

CRITICAL RISK

(9.4)

Authentication Bypass (CWE-287) in FreeScout Invites

CVE-2026-53595

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-178, CWE-287, CWE-640

Impact:

Account Takeover / Privilege Escalation

Severity:

CRITICAL RISK

(9.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A flawed invite-activation flow in FreeScout lets an anonymous attacker take over the lowest‑ID activated user account by abusing how invite hashes and expiry checks are validated.

By sending a crafted public user-setup request, an attacker can reset a legitimate user's email and password and then log in as that user without any prior session or credentials.

Affected context

This vulnerability arises in FreeScout deployments that expose the public invite activation endpoint (POST /user-setup/{hash}/{invite_sent_at}) on MySQL or MariaDB backends.

It affects accounts that were created or activated via invitation and have their invite_hash cleared after activation.

The issue is most severe when the lowest‑ID activated account is a privileged user, such as an administrator or senior support agent.

Exploit preconditions

  • Attack surface: Public web endpoint POST /user-setup/{hash}/{invite_sent_at} (OpenController@userSetupSave).
  • Required access: None; the endpoint is reachable without authentication, cookies, or an existing session.
  • Trigger point: Submitting a crafted hash path parameter (e.g., a single encoded space) and a permissive invite_sent_at value.
  • Why exploitation is possible:
  • Account selection relies solely on invite_hash equality, which treats an empty string as equal to values with trailing spaces on MySQL/MariaDB.
  • The expiry guard attempts to decrypt invite_sent_at using the target's password hash, but the helper returns the original input on failure, effectively skipping the cryptographic check.
  • The handler overwrites the selected user's email and password and automatically logs in as that user.

Why this happens

The core issue is an insecure authentication and invitation confirmation design that conflates weak, database-stored markers with strong proof of identity.

Specifically:

  • The invite_hash column is used as the sole selector for which account to activate, and is not treated as a secret once cleared; trailing-space–insensitive comparisons on MySQL/MariaDB cause %20 to match an empty stored value (CWE-178: Improper Handling of Case or Space).
  • The flow fails to enforce any authenticated context when binding the user-supplied invite parameters to an existing account (CWE-287: Improper Authentication).
  • The supposed cryptographic expiry check uses Helper::decrypt, which silently returns raw input on error instead of failing closed; this makes the time-to-live guard ineffective (CWE-640: Weak Password Recovery Mechanism for Forgotten Password pattern, repurposed here for invite validation).

Together, these patterns allow an unauthenticated request to rebind a live account's credentials by abusing the invite setup mechanism.

Potential impact

  • An attacker can reset the email address and password of the lowest‑ID activated FreeScout user.
  • The attacker can log in as that user and gain access to shared inboxes and support conversations.
  • If the affected user is an administrator, the attacker can gain full administrative control of the help desk.
  • The attacker may exfiltrate customer data, tickets, and internal communication.
  • The attacker can create or modify additional accounts to maintain persistent access.

General mitigation guidance

Effective mitigation focuses on hardening invitation and account-setup flows so they cannot be driven solely by unauthenticated, attacker-controlled parameters.

Recommended patterns include:

  • Treat invitation tokens as strong, unguessable secrets and validate them using strict, binary-safe comparison rather than relying on database semantics that ignore trailing spaces.
  • Tie invite completion to a single use of a per-user, per-invite token that becomes invalid once redeemed, and ensure it is stored and compared in a way that preserves exact value and encoding.
  • Enforce authenticated context for any operation that can overwrite an existing user's credentials, or require additional proof of control like email confirmation.
  • Design cryptographic guards to fail closed: decryption helpers should signal failure explicitly and abort processing instead of returning raw input.
  • Limit post-activation endpoints so that they cannot target already-activated accounts, or add explicit checks that prevent credential resets via invitation URLs.
  • Apply least-privilege principles to user roles so that compromise of a single account has constrained impact.

How teams detect issues like this

Organizations can detect similar weaknesses through a combination of review and testing:

  • Static analysis and code review:
  • Flag public controllers and routes that modify user credentials or authentication state without verifying an authenticated session.
  • Look for invite or token flows where user selection relies solely on database fields like invite_hash without additional checks.
  • Identify cryptographic helpers that suppress or ignore decryption/verification errors and return input as-is.
  • Review equality comparisons that depend on database behavior, especially with VARCHAR columns on MySQL/MariaDB, to ensure trailing spaces are not silently ignored.
  • Dynamic and penetration testing:
  • Exercise public onboarding or invite endpoints using modified tokens and malformed parameters to see if they affect existing users.
  • Test whether invite or password reset tokens can be reused, guessed, or applied to unintended accounts.
  • Policy enforcement:
  • Introduce guidelines that any operation changing email or password must require strong authentication or multi-step verification.
  • Use automated tools in CI that highlight routes lacking middleware for authentication while performing sensitive account operations.

Sources

SourceLink
github.comgithub.com/freescout-help-desk/freescout/security/advisories/GHSA-jqj5-r72v-v29g

Frequently asked

questions

It is broadly exploitable wherever the vulnerable invite endpoint is exposed, because it requires no authentication and only basic HTTP access; any anonymous user who can reach the FreeScout instance can attempt exploitation.

No prior access is needed beyond network reachability to the application.

The attacker does not need an existing account, cookies, or session and can trigger the vulnerable endpoint directly.

The safest pattern is to treat invite tokens as strict, single-use secrets tied to a specific account and state, verify them using robust cryptographic checks, and require an authenticated or multi-step confirmation before allowing changes to an existing user's email or password.

Additionally, error handling in cryptographic helpers should fail closed, aborting the flow when verification fails instead of continuing with untrusted values.

Future prevention involves designing all account lifecycle flows—registration, invite, password reset, and recovery—with the same rigor as primary login:

enforce strong, unguessable tokens; always check an authenticated context or secondary confirmation before modifying credentials; avoid relying on database quirks such as space-ignoring comparisons; and include automated reviews and testing focused on authentication and token-handling logic.

Find out what's already
exploitable in your codebase.