CVE-2025-54888: @fedify/fedify @fedify/fedify Has Improper Authentication And Vulnerability

HIGH
Advisory Identifier: GHSA-6jcc-xgcr-q3h4
CWE-287 CWE-863
Published
Advisory Summary

CVE-2025-54888 is a HIGH @fedify/fedify has improper authentication and vulnerability (CWE-287: Improper Authentication) affecting @fedify/fedify libraries in the npm ecosystem. The issue involves @fedify/fedify has improper authentication and incorrect authorization. Remediation is available by upgrading affected packages to version 1.3.20, 1.4.13, 1.5.5, 1.6.8, 1.7.9, 1.8.5.

CVE-2025-54888 at a Glance

CVE Identifier CVE-2025-54888
GHSA Identifier GHSA-6jcc-xgcr-q3h4
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-287: Improper Authentication
Affected Product @fedify/fedify
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-54888

To remediate this vulnerability, upgrade all affected @fedify/fedify dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@fedify/fedify fixed: 1.3.20
npm install @fedify/fedify@1.3.20
@fedify/fedify fixed: 1.4.13
npm install @fedify/fedify@1.4.13
@fedify/fedify fixed: 1.5.5
npm install @fedify/fedify@1.5.5
@fedify/fedify fixed: 1.6.8
npm install @fedify/fedify@1.6.8
@fedify/fedify fixed: 1.7.9
npm install @fedify/fedify@1.7.9
@fedify/fedify fixed: 1.8.5
npm install @fedify/fedify@1.8.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @fedify/fedify

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-54888, inspect your project dependencies using npm:

npm ls @fedify/fedify

Analyze the terminal output to locate any version of @fedify/fedify in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.20), your application is affected.

Note: The npm ls @fedify/fedify command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In @fedify/fedify, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 ```ts // 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: ```ts 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): ```ts // 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.

CVE-2025-54888 Affected @fedify/fedify Versions

6 component(s)
Fixed Versions:
1.3.201.4.131.5.51.6.81.7.91.8.5
Product / Package Ecosystem Affected Versions Fixed Version
@fedify/fedify
npm
< 1.3.20
1.3.20
@fedify/fedify
npm
≥ 1.4.0-dev.585
< 1.4.13
1.4.13
@fedify/fedify
npm
≥ 1.5.0-dev.636
< 1.5.5
1.5.5
@fedify/fedify
npm
≥ 1.6.0-dev.754
< 1.6.8
1.6.8
@fedify/fedify
npm
≥ 1.7.0-pr.251.885
< 1.7.9
1.7.9
@fedify/fedify
npm
≥ 1.8.0-dev.909
< 1.8.5
1.8.5

References

Frequently Asked Questions

What is CVE-2025-54888?
CVE-2025-54888 is a security vulnerability in @fedify/fedify involving @fedify/fedify has Improper Authentication and Incorrect Authorization under CWE-287: Improper Authentication.
Which @fedify/fedify versions are affected?
Affected versions include releases prior to 1.3.20, 1.4.13, 1.5.5, 1.6.8, 1.7.9, 1.8.5 across affected packages: @fedify/fedify.
What version fixes CVE-2025-54888?
Upgrading to 1.3.20, 1.4.13, 1.5.5, 1.6.8, 1.7.9, 1.8.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @fedify/fedify affected?
Yes, @fedify/fedify is affected in releases prior to 1.3.20, 1.4.13, 1.5.5, 1.6.8, 1.7.9, 1.8.5. Upgrade your dependency to 1.3.20, 1.4.13, 1.5.5, 1.6.8, 1.7.9, 1.8.5 or later.
What CWE is associated with CVE-2025-54888?
CVE-2025-54888 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for CVE-2025-54888?
Run the dependency tree command: 'npm ls @fedify/fedify'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6jcc-xgcr-q3h4",
  "modified" : "2026-02-04T22:13:40Z",
  "published" : "2025-08-08T14:29:48Z",
  "aliases" : [ "CVE-2025-54888" ],
  "summary" : "@fedify/fedify has Improper Authentication and Incorrect Authorization",
  "details" : "### Summary\n 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\n\n### Details\nThe vulnerability exists in handleInboxInternal function in fedify/federation/handler.ts. The critical flaw is in the order of operations:\n\n  1. Line 1712: routeActivity() is called first, which processes the activity (either immediately or by adding to queue)\n  2. Line 1730: Authentication check (doesActorOwnKey) happens AFTER processing\n\n```ts\n  // fedify/federation/handler.ts:1712-1750\n  const routeResult = await routeActivity({  // ← Activity processed here\n    context: ctx,\n    json,\n    activity,\n    recipient,\n    inboxListeners,\n    inboxContextFactory,\n    inboxErrorHandler,\n    kv,\n    kvPrefixes,\n    queue,\n    span,\n    tracerProvider,\n  });\n\n  if (\n    httpSigKey != null && !await doesActorOwnKey(activity, httpSigKey, ctx)  // ← Auth check too late\n  ) {\n    // Returns 401, but activity already processed\n    return new Response(\"The signer and the actor do not match.\", {\n      status: 401,\n      headers: { \"Content-Type\": \"text/plain; charset=utf-8\" },\n    });\n  }\n```\n\nBy the time the 401 response is returned, the malicious activity has already been processed or queued.\n\n### PoC\n\n  1. Create an activity claiming to be from any actor:\n```ts\n  const maliciousActivity = {\n    \"@context\": \"https://www.w3.org/ns/activitystreams\",\n    \"type\": \"Create\",\n    \"actor\": \"https://victim.example.com/users/alice\",  // Impersonating victim\n    \"object\": {\n      \"type\": \"Note\",\n      \"content\": \"This is a forged message!\"\n    }\n  }\n```\n  2. Sign the HTTP request with attacker's key (not the victim's):\n```ts\n  // Sign with attacker's key: https://attacker.com/users/eve#main-key\n  const signedRequest = await signRequest(request, attackerPrivateKey, attackerKeyId);\n```\n  3. Send to any Fedify inbox - the activity will be processed despite the key mismatch.\n\n### Impact\n\nType: Authentication Bypass / Actor Impersonation\n\nWho is impacted: All Fedify instances and their users\n\nConsequences: Allows complete impersonation of any ActivityPub actor, enabling:\n  - Sending fake posts/messages as any user\n  - Creating/removing follows as any user\n  - Boosting/sharing content as any user\n  - Complete compromise of federation trust model\n\nThe vulnerability affects all Fedify instances but does not propagate to other ActivityPub implementations (Mastodon, etc.) which properly validate before processing.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fedify/fedify"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.20"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fedify/fedify"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.4.0-dev.585"
      }, {
        "fixed" : "1.4.13"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fedify/fedify"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.0-dev.636"
      }, {
        "fixed" : "1.5.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fedify/fedify"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.6.0-dev.754"
      }, {
        "fixed" : "1.6.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fedify/fedify"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.7.0-pr.251.885"
      }, {
        "fixed" : "1.7.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fedify/fedify"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.8.0-dev.909"
      }, {
        "fixed" : "1.8.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/fedify-dev/fedify/security/advisories/GHSA-6jcc-xgcr-q3h4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54888"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fedify-dev/fedify/commit/14a2f8c6d2c3cbc00c3170a86ad3b7b8555c6847"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/fedify-dev/fedify"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287", "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-08T14:29:48Z",
    "nvd_published_at" : "2025-08-09T02:15:37Z"
  }
}