Skip to main content
Menu
Advisories

Inbox subscriber can plant workflow preferences on another subscriber's topic subscription

GHSA-M8FC-28R4-CC27Published Updated GitHub

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.ts
  • libs/application-generic/src/usecases/upsert-preferences/upsert-preferences.usecase.ts
  • apps/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:

  1. API-side ownership check is missing when resolving subscriptionIdentifier.
  2. The write path stores a forged subscription-scoped preference that mixes attacker identity with victim subscription identity.
  3. Worker-side evaluation trusts subscription-scoped preferences by _topicSubscriptionId without validating that _subscriberId matches the subscription owner.

End-to-end verification summary:

  1. I created a victim topic subscription and confirmed baseline delivery worked normally.
  2. I authenticated as a different subscriber in the same environment.
  3. I sent PATCH /v1/inbox/subscriptions/<victim-subscription-identifier>/preferences/<workflow-id> with { "enabled": false }.
  4. The request succeeded with 200 instead of being rejected.
  5. The stored preference record had attacker _subscriberId plus victim _topicSubscriptionId.
  6. 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 _subscriberId does 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

Affected versions

References

GitHub · novuhq/novu