GHSA-6jcc-xgcr-q3h4

Suggest an improvement
Source
https://github.com/advisories/GHSA-6jcc-xgcr-q3h4
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/08/GHSA-6jcc-xgcr-q3h4/GHSA-6jcc-xgcr-q3h4.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-6jcc-xgcr-q3h4
Aliases
Published
2025-08-08T14:29:48Z
Modified
2026-02-04T22:38:29.296687Z
Severity
  • 8.7 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
@fedify/fedify has Improper Authentication and Incorrect Authorization
Details

Summary

An authentication bypass vulnerability allows any unauthenticated attacker to impersonate any ActivityPub actor by sending forged activities signed with their own keys. Activities are processed before verifying the signing key belongs to the claimed actor, enabling complete actor impersonation across all Fedify instances

Details

The vulnerability exists in handleInboxInternal function in fedify/federation/handler.ts. The critical flaw is in the order of operations:

  1. Line 1712: routeActivity() is called first, which processes the activity (either immediately or by adding to queue)
  2. Line 1730: Authentication check (doesActorOwnKey) happens AFTER processing
  // fedify/federation/handler.ts:1712-1750
  const routeResult = await routeActivity({  // ← Activity processed here
    context: ctx,
    json,
    activity,
    recipient,
    inboxListeners,
    inboxContextFactory,
    inboxErrorHandler,
    kv,
    kvPrefixes,
    queue,
    span,
    tracerProvider,
  });

  if (
    httpSigKey != null && !await doesActorOwnKey(activity, httpSigKey, ctx)  // ← Auth check too late
  ) {
    // Returns 401, but activity already processed
    return new Response("The signer and the actor do not match.", {
      status: 401,
      headers: { "Content-Type": "text/plain; charset=utf-8" },
    });
  }

By the time the 401 response is returned, the malicious activity has already been processed or queued.

PoC

  1. Create an activity claiming to be from any actor:
      const maliciousActivity = {
        "@context": "https://www.w3.org/ns/activitystreams",
        "type": "Create",
        "actor": "https://victim.example.com/users/alice",  // Impersonating victim
        "object": {
          "type": "Note",
          "content": "This is a forged message!"
        }
      }
    
  2. Sign the HTTP request with attacker's key (not the victim's):
      // Sign with attacker's key: https://attacker.com/users/eve#main-key
      const signedRequest = await signRequest(request, attackerPrivateKey, attackerKeyId);
    
  3. Send to any Fedify inbox - the activity will be processed despite the key mismatch.

Impact

Type: Authentication Bypass / Actor Impersonation

Who is impacted: All Fedify instances and their users

Consequences: Allows complete impersonation of any ActivityPub actor, enabling: - Sending fake posts/messages as any user - Creating/removing follows as any user - Boosting/sharing content as any user - Complete compromise of federation trust model

The vulnerability affects all Fedify instances but does not propagate to other ActivityPub implementations (Mastodon, etc.) which properly validate before processing.

Database specific
{
    "nvd_published_at": "2025-08-09T02:15:37Z",
    "severity": "HIGH",
    "cwe_ids": [
        "CWE-287",
        "CWE-863"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-08-08T14:29:48Z"
}
References

Affected packages

npm
@fedify/fedify

Package

Name
@fedify/fedify
View open source insights on deps.dev
Purl
pkg:npm/%40fedify/fedify

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.3.20

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/08/GHSA-6jcc-xgcr-q3h4/GHSA-6jcc-xgcr-q3h4.json"
@fedify/fedify

Package

Name
@fedify/fedify
View open source insights on deps.dev
Purl
pkg:npm/%40fedify/fedify

Affected ranges

Type
SEMVER
Events
Introduced
1.4.0-dev.585
Fixed
1.4.13

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/08/GHSA-6jcc-xgcr-q3h4/GHSA-6jcc-xgcr-q3h4.json"
@fedify/fedify

Package

Name
@fedify/fedify
View open source insights on deps.dev
Purl
pkg:npm/%40fedify/fedify

Affected ranges

Type
SEMVER
Events
Introduced
1.5.0-dev.636
Fixed
1.5.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/08/GHSA-6jcc-xgcr-q3h4/GHSA-6jcc-xgcr-q3h4.json"
@fedify/fedify

Package

Name
@fedify/fedify
View open source insights on deps.dev
Purl
pkg:npm/%40fedify/fedify

Affected ranges

Type
SEMVER
Events
Introduced
1.6.0-dev.754
Fixed
1.6.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/08/GHSA-6jcc-xgcr-q3h4/GHSA-6jcc-xgcr-q3h4.json"
@fedify/fedify

Package

Name
@fedify/fedify
View open source insights on deps.dev
Purl
pkg:npm/%40fedify/fedify

Affected ranges

Type
SEMVER
Events
Introduced
1.7.0-pr.251.885
Fixed
1.7.9

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/08/GHSA-6jcc-xgcr-q3h4/GHSA-6jcc-xgcr-q3h4.json"
@fedify/fedify

Package

Name
@fedify/fedify
View open source insights on deps.dev
Purl
pkg:npm/%40fedify/fedify

Affected ranges

Type
SEMVER
Events
Introduced
1.8.0-dev.909
Fixed
1.8.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/08/GHSA-6jcc-xgcr-q3h4/GHSA-6jcc-xgcr-q3h4.json"