Summary
Mastodon exposed another local user's current email address and last-used IP address through a collection administration action. Any authenticated local user could access this information when the affected controller applied a general collection policy instead of the intended administrator policy.
Affected context
The issue occurs in Mastodon deployments using affected 4.6.x or 4.7.0-beta releases where the collection show action is available. The vulnerable controller authorizes access through the general collection policy namespace, allowing the action to reach information that should be restricted to administrators.
Exploit preconditions
- Attack surface: Authenticated Mastodon web application collection action
- Required access: A valid account belonging to the local Mastodon instance
- Trigger point: The collection
showaction in the administration controller - Why exploitation is possible: The action evaluates a general collection
policy instead of the administrator-specific policy, so local-user access
controls may permit retrieval of another user's identifying data
Why this happens
The underlying bug is an authorization namespace and policy-selection error. The controller used a general collection policy when evaluating an administrator-oriented action, rather than applying the corresponding administrator policy. This maps to CWE-200 because insufficient access control allowed personally identifying information, including an email address and last-used IP address, to be disclosed to an unauthorized local user.
Potential impact
- An attacker may obtain another local user's current email address.
- An attacker may learn another user's last-used IP address.
- Exposed information could support phishing, stalking, or account-targeting activity.
- The disclosure could increase privacy and operational security risks for affected users.
General mitigation guidance
Mitigation generally focuses on enforcing explicit, least-privilege authorization at every administrative action boundary. Controllers should use narrowly scoped administrator policies, avoid relying on broad collection policies for sensitive records, and apply object-level authorization before rendering identifying fields. Sensitive attributes can also be minimized, redacted, or separated from general collection responses. Security-sensitive actions should default to denial when the required policy context is absent, while session and role design should reduce unnecessary local-user privilege.
How teams detect issues like this
Detection approaches include static analysis for administrative controllers that reference non-administrative policy namespaces, code review checks that compare route intent with authorization scope, and tests that exercise collection actions using ordinary local-user roles. Runtime monitoring can alert on repeated access to administrative collection endpoints or unusual enumeration patterns. Policy-as-code and automated review tools may help enforce consistent object-level authorization and sensitive-field filtering.

