CVE-2026-136631 in Mastodon
Summary
by MITRE • 11/25/2026
Mastodon 4.7.4 and 4.8.0-alpha.3 before 5.0.0-beta.1 contains an authentication bypass vulnerability in authenticate_with_sign_in_token that allows authenticated local users to rebind pending login attempts to other accounts. Attackers can submit sign_in_token_resend with a victim's user[email] parameter, then guess the unthrottled 6-character token to sign in as inactive accounts lacking two-factor authentication.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/25/2026
The vulnerability identified in Mastodon versions prior to 5.0.0-beta.1 represents a critical flaw within the application’s session management and authentication logic, specifically affecting the authenticate_with_sign_in_token mechanism. This issue stems from an improper validation of user identity during the passwordless login process, allowing for what is technically classified as CWE-287: Improper Authentication. The core technical failure lies in the separation of concerns between initiating a sign-in request and validating the resulting token. When a local authenticated user triggers the sign_in_token_resend endpoint by providing a victim’s email address, the system generates a unique six-character alphanumeric code intended for that specific account. However, the subsequent verification step fails to strictly bind this generated token exclusively to the originating session or context in a manner that prevents lateral movement across different active sessions within the same browser environment.
This architectural weakness enables an attacker who has already gained authenticated access as one local user to hijack pending login attempts for other accounts on the instance. By submitting the victim’s email address through the resend endpoint, the attacker forces the system to generate a new sign-in token associated with that target account. Because the application does not enforce strict session isolation or require re-authentication of the current active user before allowing such sensitive operations, the authenticated local user can effectively redirect the authentication flow toward an inactive or less-secured account. This behavior violates fundamental principles of secure design regarding privilege separation and context binding, leading to a scenario where valid credentials for one role are leveraged to compromise another identity without possessing their actual password or initial login trigger.
The operational impact is significantly amplified by the characteristics of the generated token itself. The sign-in tokens consist of only six characters drawn from an alphanumeric set, resulting in a relatively small entropy space that makes brute-force attacks computationally feasible within a short timeframe. Furthermore, the vulnerability description notes that these attempts are unthrottled, meaning there are no rate-limiting mechanisms to slow down automated guessing scripts. For accounts that lack two-factor authentication, this combination of low token complexity and absence of throttling creates a high-risk vector for account takeover. An attacker can systematically guess all possible six-character combinations until the correct token is found, thereby gaining full access to the victim’s Mastodon instance without triggering typical security alerts or requiring additional credentials beyond what was already compromised in the initial authenticated session.
From an industry standard perspective, this vulnerability aligns with CWE-287 for improper authentication and CWE-306: Missing Authentication for Critical Function, as the resend action is a critical function that should require stronger proof of identity than just being logged into another account on the same platform. In terms of MITRE ATT&CK mapping, this behavior corresponds to T1078: Valid Accounts, specifically leveraging existing valid credentials to pivot and escalate privileges or access additional resources within the environment. The lack of rate limiting also reflects a deviation from best practices outlined in OWASP guidelines regarding brute force protection for authentication mechanisms.
To mitigate this vulnerability, immediate updates to Mastodon version 5.0.0-beta.1 or later are required, as these versions address the binding logic flaws and implement stricter session controls. Administrators should ensure that all instances running affected versions are patched promptly to prevent unauthorized account takeovers. Additionally, enforcing two-factor authentication for all local users is a critical compensating control that would render this specific bypass ineffective, even if an attacker successfully guesses the sign-in token. Implementing rate limiting on the sign_in_token_resend endpoint and increasing the complexity or length of generated tokens can further harden the system against brute-force attempts while waiting for full version upgrades to be deployed across all nodes in a distributed Mastodon network.