External OpenID Connect Account Takeover by E-Mail Change in mastodon
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA. Impact type from CWE-287.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| mastodon | mastodon | 4.2.0 to before 4.2.6; 4.1.0 to before 4.1.14; 4.0.0 to before 4.0.14; before 3.5.18 | 4.2.6, 4.1.14, 4.0.14, 3.5.18 | Patch available | CNA |
- mastodon Vendormastodon Affected 4.2.0 to before 4.2.6; 4.1.0 to before 4.1.14; 4.0.0 to before 4.0.14; before 3.5.18 Fixed in 4.2.6, 4.1.14, 4.0.14, 3.5.18 Patch available CNA
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:joinmastodon:mastodon:*:*:*:*:*:*:*:* | before 3.5.18; 4.0.0 to before 4.0.14; 4.1.0 to before 4.1.14; 4.2.0 to before 4.2.6 | Vulnerable | mastodon |
- cpe:2.3:a:joinmastodon:mastodon:*:*:*:*:*:*:*:* Versions before 3.5.18; 4.0.0 to before 4.0.14; 4.1.0 to before 4.1.14; 4.2.0 to before 4.2.6 Vulnerable ·mastodon
Remediation
- Fix · CNA mastodon (mastodon) Fixed in 4.2.6, 4.1.14, 4.0.14, 3.5.18
Timeline
- 2026-10-02 Threatist record created from CVE-2024-25618
References
More Mastodon vulnerabilities
- TI-2022-02004 Improper Restriction of Excessive Authentication Attempts in mastodon/mastodon CVSS 3.1CRITICAL 9.8
- TI-2025-34613 Mastodon e‑mail throttle misconfiguration allows unlimited email confirmations against unconfirmed emails CVSS 3.1HIGH 7.5
- TI-2022-22936 Mastodon through 4.0.2 allows attackers to cause a denial of service (large Sidekiq pull… CVSS 3.1HIGH 7.5
- TI-2023-18301 Mastodon vulnerable to arbitrary file creation through media attachments CVSS 3.1CRITICAL 10.0
- TI-2023-13359 Mastodon's blind LDAP injection in login allows the attacker to leak arbitrary attributes from LDAP database CVSS 3.1HIGH 7.7
- TI-2024-15826 Mastodon Remote user impersonation and takeover CVSS 3.1CRITICAL 9.8
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences