{"id":"CVE-2025-54888","aliases":["CVE-2025-54888","GHSA-6jcc-xgcr-q3h4"],"related":[],"kind":"vulnerability","state":"published","title":"@fedify/fedify: Improper Authentication and Incorrect Authorization","summary":"Fedify is a TypeScript library for building federated server apps powered by ActivityPub. In versions below 1.3.20, 1.4.0-dev.585 through 1.4.12, 1.5.0-dev.636 through 1.5.4, 1.6.0-dev.754 through 1.6.7, 1.7.0-pr.251.885 through 1.7.8 and 1.8.0-dev.909 through 1.8.4, 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. This is fixed in versions 1.3.20, 1.4.13, 1.5.5, 1.6.8, 1.7.9 and 1.8.5.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Fedify is a TypeScript library for building federated server apps powered by ActivityPub. In versions below 1.3.20, 1.4.0-dev.585 through 1.4.12, 1.5.0-dev.636 through 1.5.4, 1.6.0-dev.754 through 1.6.7, 1.7.0-pr.251.885 through 1.7.8 and 1.8.0-dev.909 through 1.8.4, 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. This is fixed in versions 1.3.20, 1.4.13, 1.5.5, 1.6.8, 1.7.9 and 1.8.5.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Fedify es una librería de TypeScript para crear aplicaciones de servidores federados con tecnología ActivityPub. En las versiones anteriores a la 1.3.20, 1.4.0-dev.585 a 1.4.12, 1.5.0-dev.636 a 1.5.4, 1.6.0-dev.754 a 1.6.7, 1.7.0-pr.251.885 a 1.7.8 y 1.8.0-dev.909 a 1.8.4, una vulnerabilidad de omisión de autenticación permite a cualquier atacante no autenticado suplantar la identidad de cualquier actor de ActivityPub mediante el envío de actividades falsificadas firmadas con sus propias claves. Las actividades se procesan antes de verificar que la clave de firma pertenezca al actor declarado, lo que permite la suplantación completa del actor en todas las instancias de Fedify. Esto se solucionó en las versiones 1.3.20, 1.4.13, 1.5.5, 1.6.8, 1.7.9 y 1.8.5.","source":"nvd"}],"published":"2025-08-08T14:29:48.000Z","modified":"2026-06-17T09:40:52.337Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"}],"cwes":["CWE-287","CWE-863"],"affected":[{"ranges":[{"version":"< 1.3.20","status":"affected"},{"version":">= 1.4.0-dev.585, < 1.4.13","status":"affected"},{"version":">= 1.5.0-dev.636, < 1.5.5","status":"affected"},{"version":">= 1.6.0-dev.754, < 1.6.8","status":"affected"},{"version":">= 1.7.0-pr.251.885, < 1.7.9","status":"affected"},{"version":">= 1.8.0-dev.909, < 1.8.5","status":"affected"}],"vendor":"fedify-dev","product":"fedify","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.3.20"}],"ecosystem":"npm","package":"@fedify/fedify","purl":"pkg:npm/%40fedify/fedify","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.4.0-dev.585","status":"affected","fixed":"1.4.13"}],"ecosystem":"npm","package":"@fedify/fedify","purl":"pkg:npm/%40fedify/fedify","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.5.0-dev.636","status":"affected","fixed":"1.5.5"}],"ecosystem":"npm","package":"@fedify/fedify","purl":"pkg:npm/%40fedify/fedify","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.6.0-dev.754","status":"affected","fixed":"1.6.8"}],"ecosystem":"npm","package":"@fedify/fedify","purl":"pkg:npm/%40fedify/fedify","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.7.0-pr.251.885","status":"affected","fixed":"1.7.9"}],"ecosystem":"npm","package":"@fedify/fedify","purl":"pkg:npm/%40fedify/fedify","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.8.0-dev.909","status":"affected","fixed":"1.8.5"}],"ecosystem":"npm","package":"@fedify/fedify","purl":"pkg:npm/%40fedify/fedify","source":"ghsa"}],"references":[{"url":"https://github.com/fedify-dev/fedify/security/advisories/GHSA-6jcc-xgcr-q3h4","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/fedify-dev/fedify/commit/14a2f8c6d2c3cbc00c3170a86ad3b7b8555c6847","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-54888","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/fedify-dev/fedify","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-08-11T13:48:34.676Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-54888","url":"https://www.cve.org/CVERecord?id=CVE-2025-54888","licence":"CVE Terms of Use","modified":"2026-02-04T22:13:48.899Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6jcc-xgcr-q3h4","url":"https://github.com/advisories/GHSA-6jcc-xgcr-q3h4","licence":"CC-BY-4.0","modified":"2026-02-04T22:38:29.296Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-54888","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-54888","licence":"Public domain","modified":"2026-06-17T09:40:52.337Z"}],"updatedAt":"2026-11-25T22:59:02.220Z","epss":{"score":0.00672,"percentile":0.53345,"date":"2026-12-01T12:00:22.000Z"}}