/

CVE-2026-47777

Severity:

HIGH RISK

(7.5)

Authorization Bypass (CWE-863) in Mastodon Collections

CVE-2026-47777

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-345, CWE-863

Impact:

Unauthorized data exposure and trust manipulation across federated servers

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Mastodon's experimental Collections feature contains an authorization flaw that lets attackers fake consent for accounts to be featured in remote Collections. By forging the FeatureAuthorization object, an attacker can make it appear that a remote account agreed to be included when it did not, under specific experimental deployments.

The issue arises from incomplete validation of the object referenced by the authorization, allowing the consent check to be bypassed in certain configurations of Mastodon's main branch or nightly builds with Collections enabled.

Affected context

The vulnerability appears in Mastodon instances that:

  • Run the main branch or nightly builds, and
  • Explicitly enable the experimental Collections feature via the EXPERIMENTAL_FEATURES environment variable, and
  • Participate in federated interactions where remote accounts may be featured in Collections.

It affects the logic that verifies whether a remote account has consented to be featured, when remote FeatureAuthorization objects are used to assert that consent across domains.

Exploit preconditions

  • Attack surface: Federated ActivityPub endpoints handling Collections and FeatureAuthorization objects.
  • Required access: Ability to publish or relay crafted ActivityPub data to a vulnerable Mastodon instance (typically via any ActivityPub-compatible server the attacker controls).
  • Trigger point: Processing of a Collection item that asserts consent via a FeatureAuthorization object hosted on the same domain as the featured account.
  • Why exploitation is possible: The implementation checks that the FeatureAuthorization resides on the same domain as the target object, but does not verify that the referenced object is actually the same as the object in the Collection item. This incomplete verification (CWE-345, CWE-863) allows an attacker to forge a valid-looking authorization for a different object.

Why this happens

The root cause is an incomplete authorization and integrity check around the FeatureAuthorization object used to confirm consent for being featured in a Collection. The code correctly enforces that the authorization object must live on the same domain as the account it refers to, but fails to ensure that the internal reference within the authorization matches the exact object included in the Collection entry.

This pattern maps to CWE-863: Incorrect Authorization, where the system treats a partially validated token or object as sufficient proof of permission, and CWE-345: Insufficient Verification of Data Authenticity, because it does not fully bind the authorization to the specific resource. In abstract terms, the system trusts an attestment ("this account consented") without cryptographically or semantically tying it to the concrete Collection item being processed.

Potential impact

  • Remote accounts could be featured in Collections without their actual consent.
  • Users and administrators may be misled about which accounts approved being highlighted, eroding trust in the platform.
  • Reputation or privacy expectations of affected accounts could be undermined if they appear to endorse Collections they did not authorize.
  • Federated network relationships may be strained if remote instances see their users misrepresented in Collections.

General mitigation guidance

Effective mitigation centers around strengthening authorization checks and the binding between consent and the specific resource:

  • Ensure that any authorization object (such as FeatureAuthorization) is strictly bound to the exact object it is authorizing, including verifying identifiers and canonical URIs against the Collection item.
  • Treat federated proof-of-consent tokens as untrusted input and perform full, context-aware validation before using them for authorization decisions.
  • Design authorization artifacts to be non-reusable outside their intended scope, for example by including explicit resource identifiers, issuers, and expiry semantics.
  • Apply defense-in-depth on experimental or feature-flagged capabilities by restricting their use, logging decisions, and defaulting to "no consent" when validation is ambiguous or incomplete.
  • Minimize implicit trust in remote servers; require strong, explicit signals when accepting remote assertions of user consent or policy decisions.

How teams detect issues like this

Detection typically involves a mix of code- and behavior-focused approaches:

  • Static analysis and code review:
  • Look for authorization decisions that depend on remote or federated tokens without robust equality checks between the token's referenced object and the active resource.
  • Flag logic that only checks coarse conditions (e.g., domain match) but not precise identifiers, URIs, or signatures.
  • Review experimental or feature-flagged code paths where security invariants may be weaker or still evolving.
  • Runtime and logging analysis:
  • Instrument authorization flows to log when remote consent artifacts are accepted, including the object IDs they relate to.
  • Monitor for patterns where the same FeatureAuthorization artifact is reused across multiple different objects or Collections.
  • Policy enforcement:
  • Configure CI/CD pipelines to require manual security review for changes involving authorization objects or cross-instance trust decisions.
  • Use automated review tools or SAST platforms with rules tuned for broken authorization patterns and insufficient identity binding.

Sources

SourceLink
github.comgithub.com/mastodon/mastodon/commit/22203f8aeb03e8f14dc62e253e83db39825a5bcf
github.comgithub.com/mastodon/mastodon/security/advisories/GHSA-vg36-gxjg-2v46

Frequently asked

questions

Yes, in affected deployments, a remote attacker who can control or influence ActivityPub data sent to a vulnerable Mastodon instance can exploit the issue by forging FeatureAuthorization objects, as long as the other exploit preconditions are met.

The attacker does not need a local account on the vulnerable instance. They generally need control of a federated server or similar capability to send crafted ActivityPub messages that the Mastodon instance will accept and process for Collections.

Strengthen the authorization flow so that consent artifacts are cryptographically or semantically bound to the exact resource they authorize, and verify that binding before making any authorization decision. In ambiguous cases, default to denying inclusion in Collections rather than assuming consent.

Treat remote assertions, especially around consent and authorization, as untrusted data that must undergo strict validation. During design and implementation, explicitly model trust boundaries, require resource-specific binding in any authorization artifact, and enforce security reviews for new federated or experimental features before they are exposed to production-like environments.

Find out what's already
exploitable in your codebase.