CVE-2025-54888: @fedify/fedify has Improper Authentication and Incorrect Authorization
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…
Published Aug 8, 2025 · Updated Feb 4, 2026
Affected packages
@fedify/fedify
- Ecosystem
- npm
- Affected
- < 1.3.20
- Fixed in
- 1.3.20
- Check
npm ls @fedify/fedify
@fedify/fedify
- Ecosystem
- npm
- Affected
- >= 1.4.0-dev.585, < 1.4.13
- Fixed in
- 1.4.13
- Check
npm ls @fedify/fedify
@fedify/fedify
- Ecosystem
- npm
- Affected
- >= 1.5.0-dev.636, < 1.5.5
- Fixed in
- 1.5.5
- Check
npm ls @fedify/fedify
@fedify/fedify
- Ecosystem
- npm
- Affected
- >= 1.6.0-dev.754, < 1.6.8
- Fixed in
- 1.6.8
- Check
npm ls @fedify/fedify
@fedify/fedify
- Ecosystem
- npm
- Affected
- >= 1.7.0-pr.251.885, < 1.7.9
- Fixed in
- 1.7.9
- Check
npm ls @fedify/fedify
@fedify/fedify
- Ecosystem
- npm
- Affected
- >= 1.8.0-dev.909, < 1.8.5
- Fixed in
- 1.8.5
- Check
npm ls @fedify/fedify
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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:
- Line 1712: routeActivity() is called first, which processes the activity (either immediately or by adding to queue)
- 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
- 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!"
}
}- 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);- 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.
Credited to allouis, dahlia.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-50131
Fedify has an incomplete SSRF mitigation after GHSA-p9cg-vqcc-grcx: validatePublicUrl allows special-use IPv4 ranges
high8.6Jul 14, 2026CVE-2026-42462
Fedify has an LD-Signature Bypass via JSON-LD Named-Graph Restructuring
high7.0May 26, 2026CVE-2026-34148
Fedify affected by resource exhaustion caused by unbounded redirect following during remote key/document resolution
high7.5Apr 7, 2026CVE-2025-68475
Fedify has ReDoS Vulnerability in HTML Parsing Regex
high7.5Dec 22, 2025CVE-2025-23221
Infinite loop and Blind SSRF found inside the Webfinger mechanism in @fedify/fedify
medium5.4Jan 21, 2025CVE-2024-39687
Server Side Request Forgery (SSRF) attack in Fedify
medium7.2Jul 5, 2024
