Описание
@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 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
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:
- Sign the HTTP request with attacker's key (not the victim's):
- 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.
Пакеты
@fedify/fedify
< 1.3.20
1.3.20
@fedify/fedify
>= 1.4.0-dev.585, < 1.4.13
1.4.13
@fedify/fedify
>= 1.5.0-dev.636, < 1.5.5
1.5.5
@fedify/fedify
>= 1.6.0-dev.754, < 1.6.8
1.6.8
@fedify/fedify
>= 1.7.0-pr.251.885, < 1.7.9
1.7.9
@fedify/fedify
>= 1.8.0-dev.909, < 1.8.5
1.8.5
Связанные уязвимости
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.