Summary
Mastodon's experimental FASP registration flow fails to consistently verify that a FASP client has been approved before allowing it to subscribe to lifecycle events or request content backfill.
On instances that have explicitly enabled the fasp experimental feature, an attacker can create unapproved FASP registrations and still trigger subscriptions and repeated backfill requests, causing unnecessary load and potential denial of service on the fasp Sidekiq queue.
Affected context
This issue affects Mastodon servers that:
- Are running versions 4.4.0 through 4.4.13 or 4.5.0 through 4.5.6, and
- Have explicitly opted in to the experimental FASP feature by setting
EXPERIMENTAL_FEATURESto includefasp, and - Use the FASP registration flow, which nominally requires manual administrator approval.
In this context, actions that subscribe to account/content lifecycle events or trigger backfill for FASP registrations are executed without reliably confirming that the FASP has been approved by an administrator.
Exploit preconditions
- Attack surface: Network-accessible Mastodon instance with the
faspexperimental flag enabled. - Required access: Ability to interact with the FASP registration and related FASP endpoints (no successful admin approval required).
- Trigger point:
- Submitting FASP-related actions such as:
- Subscriptions to account/content lifecycle events
- Requests for content backfill
- Doing so repeatedly to create sustained load.
- Why exploitation is possible: The authorization logic for FASP actions checks that a FASP registration exists, but does not robustly verify its approval state before processing subscriptions or backfill requests. This missing approval check allows unapproved FASPs to consume resources as if they were trusted, leading to a low-value information leak and, when repeated, a denial-of-service condition on the
faspSidekiq worker.
Why this happens
The vulnerability stems from incomplete authorization logic around the experimental FASP workflow.
While FASP registrations conceptually require manual administrator approval, the code paths handling FASP subscriptions and backfill requests do not consistently enforce this approval state. Instead, they allow actions to proceed as long as a registration exists, regardless of its status.
This behavior maps to CWE-862: Missing Authorization, where an application performs security-sensitive operations without verifying that the caller is authorized to perform them. Here, the "subject" is the FASP registration (and its client), and the "object" is the ability to subscribe to lifecycle events and request content backfill. By omitting a strict approval-state check, the system grants capabilities that should be restricted to approved FASPs only.
Potential impact
- Unapproved FASP clients can subscribe to account/content lifecycle events as though they were approved.
- Repeated backfill requests can cause significant load on the
faspSidekiq worker, potentially leading to denial of service for legitimate FASP processing. - Resource exhaustion on the background job infrastructure may degrade performance for other tasks that share the same worker pool.
- Minor information leakage of URIs and content references that are already publicly available, but exposed via structured backfill mechanisms.
General mitigation guidance
Effective mitigation focuses on ensuring that every FASP-sensitive operation enforces explicit authorization tied to the FASP's approval state, and that experimental features do not weaken core security assumptions.
Pattern-based mitigations include:
- Centralize authorization logic: Implement a single, reusable authorization check for FASP operations that validates:
- The existence of a FASP registration, and
- That its status is "approved" before any subscriptions or backfill tasks are accepted.
- State-aware access control: Represent FASP lifecycle states (pending, approved, rejected, disabled) in a way that makes it difficult to bypass checks (for example, using enums and strict guards in service-layer methods).
- Deny-by-default behavior: Treat unapproved or indeterminate FASP states as unauthorized and reject associated actions, returning clear error codes for clients.
- Guard experimental features: Wrap all experimental endpoints behind feature flags and authorization middleware that are tested with the same rigor as stable features, including negative test cases (unapproved, revoked, or malformed registrations).
- Resource protection: Configure rate limiting or per-client quotas for backfill and subscription operations so that a single FASP client, even if authorized, cannot monopolize the
faspqueue. - Privilege minimization: Separate processing queues and workers for experimental features where practical, reducing blast radius if those features misbehave or are abused.
How teams detect issues like this
Detection can leverage both code-centric and operational approaches:
- Static analysis patterns:
- Search for FASP-related endpoints or services (e.g., classes or controllers handling
faspflows) that enqueue jobs or subscribe to events without invoking a shared authorization routine. - Flag code that checks for FASP existence but not explicit approval or status fields when performing high-cost actions like backfill.
- Enforce patterns such as "all FASP actions must pass through an authorization helper" using custom rules in linters or static analyzers.
- Code review signals:
- New or modified FASP-related routes, controllers, or services that:
- Access lifecycle events or initiate backfill jobs, and
- Rely solely on presence of a token/ID without checking its state or owner.
- Any logic bypassing global authentication/authorization middleware in the name of "experimental" or "test" functionality.
- Operational monitoring:
- Instrument Sidekiq metrics for the
faspqueue, alerting on: - Unusually high job throughput or backlog growth.
- Repeated backfill requests tied to the same FASP registration or IP range.
- Log FASP subscription and backfill requests with associated registration IDs and approval status, then search for actions performed by unapproved entities.
- Policy enforcement:
- Include checks in CI pipelines that reject merges when FASP-related code additions do not reference centralized authorization utilities.
- Periodically review configuration for experimental flags like
faspand ensure they are only enabled on instances meant for testing with appropriate monitoring in place.

