CVE-2024-25618: CWE-287: Improper Authentication in mastodon mastodon
Mastodon is a free, open-source social network server based on ActivityPub. Mastodon allows new identities from configured authentication providers (CAS, SAML, OIDC) to attach to existing local users with the same e-mail address. This results in a possible account takeover if the authentication provider allows changing the e-mail address or multiple authentication providers are configured. When a user logs in through an external authentication provider for the first time, Mastodon checks the e-mail address passed by the provider to find an existing account. However, using the e-mail address alone means that if the authentication provider allows changing the e-mail address of an account, the Mastodon account can immediately be hijacked. All users logging in through external authentication providers are affected. The severity is medium, as it also requires the external authentication provider to misbehave. However, some well-known OIDC providers (like Microsoft Azure) make it very easy to accidentally allow unverified e-mail changes. Moreover, OpenID Connect also allows dynamic client registration. This issue has been addressed in versions 4.2.6, 4.1.14, 4.0.14, and 3.5.18. Users are advised to upgrade. There are no known workarounds for this vulnerability.
AI Analysis
Technical Summary
CVE-2024-25618 is a medium-severity improper authentication vulnerability (CWE-287) affecting Mastodon, an open-source social network server implementing the ActivityPub protocol. The flaw arises from how Mastodon handles user authentication via external providers such as CAS, SAML, and OpenID Connect (OIDC). When a user logs in for the first time through an external authentication provider, Mastodon attempts to link the external identity to an existing local account by matching the e-mail address provided by the authentication provider. However, this process relies solely on the e-mail address without additional verification. If the external authentication provider permits changing the e-mail address associated with an account, or if multiple authentication providers are configured, an attacker can manipulate the e-mail address to hijack an existing Mastodon account. This is because Mastodon trusts the e-mail address asserted by the external provider to identify the user, enabling an attacker who controls or exploits the external provider to gain unauthorized access to the Mastodon account linked to that e-mail. The vulnerability is exacerbated by the fact that some popular OIDC providers, including Microsoft Azure, can allow unverified e-mail changes, increasing the risk of exploitation. Additionally, OpenID Connect's dynamic client registration can complicate secure configurations. The issue affects multiple versions of Mastodon prior to patched releases 4.2.6, 4.1.14, 4.0.14, and 3.5.18. There are no known workarounds, making upgrading essential. The CVSS 3.1 base score is 4.2, reflecting a medium severity with low confidentiality and integrity impact, no availability impact, network attack vector, high attack complexity, no privileges required, and requiring user interaction. No known exploits are currently in the wild, but the vulnerability poses a risk especially where external authentication providers are misconfigured or allow e-mail changes without verification.
Potential Impact
For European organizations using Mastodon as a social networking or communication platform, this vulnerability could lead to unauthorized account takeovers if their external authentication providers allow e-mail address changes or if multiple providers are configured insecurely. Such account compromises could result in unauthorized access to sensitive communications, impersonation, and potential reputational damage. Given Mastodon's popularity among privacy-conscious and decentralized social networks, organizations relying on it for internal or community engagement could face disruption or data leakage. The risk is heightened in environments where Microsoft Azure or similar OIDC providers are used without strict e-mail verification policies. Although the vulnerability requires a misbehaving or compromised external authentication provider, the potential for account hijacking undermines trust in federated identity management. This could impact confidentiality and integrity of user accounts and associated data, although availability is not affected. The medium severity suggests that while exploitation is not trivial, the impact on affected accounts can be significant, especially for high-profile or sensitive users within European entities.
Mitigation Recommendations
The primary mitigation is to upgrade Mastodon installations to versions 4.2.6, 4.1.14, 4.0.14, or 3.5.18 or later, where the vulnerability has been addressed. Organizations should audit and harden their external authentication providers to ensure that e-mail addresses cannot be changed without verification or administrative approval. Specifically, disable or restrict unverified e-mail changes in OIDC providers like Microsoft Azure. Avoid configuring multiple external authentication providers that could conflict or allow identity confusion. Implement additional verification steps in Mastodon for linking external identities, such as requiring proof beyond e-mail matching. Monitor authentication logs for unusual login patterns or changes in linked e-mail addresses. Where possible, use authentication providers that enforce strict identity verification and support multi-factor authentication. Finally, educate users about the risks of account takeover and encourage vigilance regarding authentication notifications.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Belgium, Austria, Switzerland
CVE-2024-25618: CWE-287: Improper Authentication in mastodon mastodon
Description
Mastodon is a free, open-source social network server based on ActivityPub. Mastodon allows new identities from configured authentication providers (CAS, SAML, OIDC) to attach to existing local users with the same e-mail address. This results in a possible account takeover if the authentication provider allows changing the e-mail address or multiple authentication providers are configured. When a user logs in through an external authentication provider for the first time, Mastodon checks the e-mail address passed by the provider to find an existing account. However, using the e-mail address alone means that if the authentication provider allows changing the e-mail address of an account, the Mastodon account can immediately be hijacked. All users logging in through external authentication providers are affected. The severity is medium, as it also requires the external authentication provider to misbehave. However, some well-known OIDC providers (like Microsoft Azure) make it very easy to accidentally allow unverified e-mail changes. Moreover, OpenID Connect also allows dynamic client registration. This issue has been addressed in versions 4.2.6, 4.1.14, 4.0.14, and 3.5.18. Users are advised to upgrade. There are no known workarounds for this vulnerability.
AI-Powered Analysis
Technical Analysis
CVE-2024-25618 is a medium-severity improper authentication vulnerability (CWE-287) affecting Mastodon, an open-source social network server implementing the ActivityPub protocol. The flaw arises from how Mastodon handles user authentication via external providers such as CAS, SAML, and OpenID Connect (OIDC). When a user logs in for the first time through an external authentication provider, Mastodon attempts to link the external identity to an existing local account by matching the e-mail address provided by the authentication provider. However, this process relies solely on the e-mail address without additional verification. If the external authentication provider permits changing the e-mail address associated with an account, or if multiple authentication providers are configured, an attacker can manipulate the e-mail address to hijack an existing Mastodon account. This is because Mastodon trusts the e-mail address asserted by the external provider to identify the user, enabling an attacker who controls or exploits the external provider to gain unauthorized access to the Mastodon account linked to that e-mail. The vulnerability is exacerbated by the fact that some popular OIDC providers, including Microsoft Azure, can allow unverified e-mail changes, increasing the risk of exploitation. Additionally, OpenID Connect's dynamic client registration can complicate secure configurations. The issue affects multiple versions of Mastodon prior to patched releases 4.2.6, 4.1.14, 4.0.14, and 3.5.18. There are no known workarounds, making upgrading essential. The CVSS 3.1 base score is 4.2, reflecting a medium severity with low confidentiality and integrity impact, no availability impact, network attack vector, high attack complexity, no privileges required, and requiring user interaction. No known exploits are currently in the wild, but the vulnerability poses a risk especially where external authentication providers are misconfigured or allow e-mail changes without verification.
Potential Impact
For European organizations using Mastodon as a social networking or communication platform, this vulnerability could lead to unauthorized account takeovers if their external authentication providers allow e-mail address changes or if multiple providers are configured insecurely. Such account compromises could result in unauthorized access to sensitive communications, impersonation, and potential reputational damage. Given Mastodon's popularity among privacy-conscious and decentralized social networks, organizations relying on it for internal or community engagement could face disruption or data leakage. The risk is heightened in environments where Microsoft Azure or similar OIDC providers are used without strict e-mail verification policies. Although the vulnerability requires a misbehaving or compromised external authentication provider, the potential for account hijacking undermines trust in federated identity management. This could impact confidentiality and integrity of user accounts and associated data, although availability is not affected. The medium severity suggests that while exploitation is not trivial, the impact on affected accounts can be significant, especially for high-profile or sensitive users within European entities.
Mitigation Recommendations
The primary mitigation is to upgrade Mastodon installations to versions 4.2.6, 4.1.14, 4.0.14, or 3.5.18 or later, where the vulnerability has been addressed. Organizations should audit and harden their external authentication providers to ensure that e-mail addresses cannot be changed without verification or administrative approval. Specifically, disable or restrict unverified e-mail changes in OIDC providers like Microsoft Azure. Avoid configuring multiple external authentication providers that could conflict or allow identity confusion. Implement additional verification steps in Mastodon for linking external identities, such as requiring proof beyond e-mail matching. Monitor authentication logs for unusual login patterns or changes in linked e-mail addresses. Where possible, use authentication providers that enforce strict identity verification and support multi-factor authentication. Finally, educate users about the risks of account takeover and encourage vigilance regarding authentication notifications.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2024-02-08T22:26:33.510Z
- Cisa Enriched
- true
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682d9816c4522896dcbd6d2b
Added to database: 5/21/2025, 9:08:38 AM
Last enriched: 7/4/2025, 9:56:29 PM
Last updated: 8/4/2025, 1:54:36 PM
Views: 13
Related Threats
CVE-2025-8863: CWE-319 Cleartext Transmission of Sensitive Information in YugabyteDB Inc YugabyteDB
HighCVE-2025-8847: Cross Site Scripting in yangzongzhuan RuoYi
MediumCVE-2025-8839: Improper Authorization in jshERP
MediumCVE-2025-8862: CWE-201 Insertion of Sensitive Information Into Sent Data in YugabyteDB Inc YugabyteDB
HighCVE-2025-8846: Stack-based Buffer Overflow in NASM Netwide Assember
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.