Inbox subscriber can plant workflow preferences on another subscriber's topic subscription
Description
This route is intended to let an authenticated inbox subscriber manage workflow preferences for that subscriber's own topic subscription. However, the API resolves the target topic subscription by environment, organization, identifier, and optional context without enforcing that the subscription belongs to the authenticated subscriber. The subsequent write stores a forged SUBSCRIPTION_SUBSCRIBER_WORKFLOW preference that combines the attacker's _subscriberId with the victim subscription's _topicSubscriptionId and the targeted workflow _templateId.
The issue becomes end-to-end exploitable because the worker-side topic delivery path later reads subscription-scoped preferences by _topicSubscriptionId + _templateId and also omits _subscriberId. As a result, the worker consumes the attacker-planted record during delivery evaluation for the victim subscription.
I verified the full chain against self-hosted Novu 3.15.0 with both a focused e2e regression and a live API + worker runtime proof.
Affected code paths include:
apps/api/src/app/inbox/usecases/update-preferences/update-preferences.usecase.tslibs/application-generic/src/usecases/upsert-preferences/upsert-preferences.usecase.tsapps/worker/src/app/workflow/usecases/subscriber-job-bound/subscriber-job-bound.usecase.ts
Impact summary:
- one authenticated inbox subscriber can target another subscriber's subscription identifier
- the unauthorized request returns
200 - the database stores a cross-boundary preference record bound to the victim subscription but owned by the attacker
- later topic-triggered notifications for the victim can be suppressed by planting
enabled=false
Root cause details:
- API-side ownership check is missing when resolving
subscriptionIdentifier. - The write path stores a forged subscription-scoped preference that mixes attacker identity with victim subscription identity.
- Worker-side evaluation trusts subscription-scoped preferences by
_topicSubscriptionIdwithout validating that_subscriberIdmatches the subscription owner.
End-to-end verification summary:
- I created a victim topic subscription and confirmed baseline delivery worked normally.
- I authenticated as a different subscriber in the same environment.
- I sent
PATCH /v1/inbox/subscriptions/<victim-subscription-identifier>/preferences/<workflow-id>with{ "enabled": false }. - The request succeeded with
200instead of being rejected. - The stored preference record had attacker
_subscriberIdplus victim_topicSubscriptionId. - After triggering the same workflow to the same topic again, the victim received no new notifications because the worker honored the forged preference.
This is a concrete subscriber-to-subscriber authorization failure with real integrity impact on another subscriber's notification policy. Although the effect suppresses later delivery, the core issue is unauthorized cross-subscriber state manipulation rather than a generic service disruption claim.
Recommended fix:
- enforce subscriber ownership when resolving the target subscription in the inbox preference route
- reject writes where
_subscriberIddoes not match the owner of_topicSubscriptionId - require worker-side subscription preference evaluation to validate subscriber ownership before honoring subscription-scoped preference records
- add regression coverage proving that one subscriber cannot plant preferences onto another subscriber's topic subscription