CVE-2024-25623: Lack of media type verification of Activity Streams objects allows impersonation of remote accounts
Mastodon is a free, open-source social network server based on ActivityPub. Prior to versions 4.2.7, 4.1.15, 4.0.15, and 3.5.19, when fetching remote statuses, Mastodon doesn't check that the response from the remote server has a Content-Type header value of the Activity Streams media type, which allows a threat actor to upload a crafted Activity Streams document to a remote server and make a Mastodon server fetch it, if the remote server accepts arbitrary user uploads. The vulnerability allows a threat actor to impersonate an account on a remote server that satisfies all of the following properties: allows the attacker to register an account; accepts arbitrary user-uploaded documents and places them on the same domain as the ActivityPub actors; and serves user-uploaded document in response to requests with an Accept header value of the Activity Streams media type. Versions 4.2.7, 4.1.15, 4.0.15, and 3.5.19 contain a fix for this issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Mastodonto a version that resolves this vulnerability.Fixed in 4.2.7 - Upgrade
Upgrade
Mastodonto a version that resolves this vulnerability.Fixed in 4.1.15 - Upgrade
Upgrade
Mastodonto a version that resolves this vulnerability.Fixed in 4.0.15 - Upgrade
Upgrade
Mastodonto a version that resolves this vulnerability.Fixed in 3.5.19
Event History
Frequently Asked Questions
What is the severity of CVE-2024-25623?
CVE-2024-25623 is classified as a medium severity vulnerability.
How do I fix CVE-2024-25623?
To fix CVE-2024-25623, upgrade your Mastodon installation to version 4.2.7 or later, or 4.1.15 or later, 4.0.15 or later, or 3.5.19 or later.
Which versions of Mastodon are affected by CVE-2024-25623?
CVE-2024-25623 affects Mastodon versions prior to 3.5.19, 4.0.15, 4.1.15, and 4.2.7.
What type of issue does CVE-2024-25623 represent?
CVE-2024-25623 represents a vulnerability related to improper validation of the Content-Type header when fetching remote statuses.
Is my server vulnerable if I am running an updated version of Mastodon?
If you are running Mastodon version 4.2.7 or higher, 4.1.15 or higher, 4.0.15 or higher, or 3.5.19 or higher, your server is not vulnerable to CVE-2024-25623.