# GHSA-32MR-9P6F-CX3X: Inbox subscriber can read and modify another subscriber's topic subscription by identifier

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2026-06-07
- Modified: 2026-06-07

## Affected versions

- @novu/api-service (npm): fixed in 3.17.0

## Description

# Inbox Subscriber Can Read and Modify Another Subscriber's Topic Subscription by Identifier

## Report Metadata

- Target: Novu
- Product area: Inbox, topic subscriptions, subscriber authorization
- Verified against: self-hosted Novu 3.15.0
- Finding type: broken access control, subscriber-to-subscriber IDOR
- Suggested severity: High
- Confidence: High

## Executive Summary

Novu exposes inbox topic subscription endpoints to authenticated subscriber JWTs, but the read and update flows authorize by `topicKey + subscription identifier + environment + organization` and do not bind the lookup to the authenticated subscriber.

I verified end to end that one inbox subscriber can:

- read another subscriber's topic subscription by calling `GET /v1/inbox/topics/:topicKey/subscriptions/:identifier`
- rename that other subscriber's topic subscription by calling `PATCH /v1/inbox/topics/:topicKey/subscriptions/:identifier`

This is a real subscriber-to-subscriber authorization bypass inside the same environment. The attacker only needs a valid subscriber JWT plus knowledge of the victim subscription identifier and topic key.

## Vulnerability Classification

- Category: broken access control / IDOR
- Boundary crossed:
  - one authenticated inbox subscriber to another subscriber's subscription object
- Primary impacts:
  - confidentiality
  - integrity

## Security Expectation

Inbox subscriber routes should be scoped to the authenticated subscriber identity.

More concretely:

- a subscriber JWT should only be able to retrieve subscriptions owned by that same subscriber
- a subscriber JWT should only be able to update subscriptions owned by that same subscriber
- knowledge of `topicKey` and `identifier` should not be enough to access another subscriber's subscription

## Affected Functionality

Verified vulnerable endpoints:

- `GET /v1/inbox/topics/:topicKey/subscriptions/:identifier`
- `PATCH /v1/inbox/topics/:topicKey/subscriptions/:identifier`

Related code areas:

- `apps/api/src/app/inbox/inbox.topic.controller.ts`
- `apps/api/src/app/subscriptions/usecases/get-subscription/get-subscription.usecase.ts`
- `apps/api/src/app/subscriptions/usecases/update-subscription/update-subscription.usecase.ts`

Verified proof file:

- `apps/api/src/app/inbox/e2e/subscription-ownership-idor.e2e.ts`

## Root Cause Summary

The issue comes from combining two behaviors:

1. the inbox subscriber routes accept an authenticated subscriber JWT
2. the downstream read and update use cases query subscriptions without requiring `_subscriberId` to match the authenticated subscriber

That means subscription ownership is effectively reduced to possession of the subscription identifier.

## Relevant Code Analysis

### 1. Inbox Subscriber Controller Does Not Pass Subscriber Ownership to Read and Update Use Cases

In `apps/api/src/app/inbox/inbox.topic.controller.ts`:

- `GET /topics/:topicKey/subscriptions/:identifier` builds `GetSubscriptionCommand` with environment, organization, topic key, identifier, and context keys
- `PATCH /topics/:topicKey/subscriptions/:identifier` builds `UpdateSubscriptionCommand` with environment, organization, topic key, identifier, and context keys

Neither call includes the authenticated subscriber's internal id for ownership enforcement.

### 2. Read Path Looks Up Subscription Without `_subscriberId`

In `apps/api/src/app/subscriptions/usecases/get-subscription/get-subscription.usecase.ts`, the lookup uses:

- `_environmentId`
- `_organizationId`
- `topicKey`
- `identifier`
- optional context filter

It does not require `_subscriberId` to match the authenticated subscriber session.

As a result, any subscriber who knows the identifier can retrieve the target subscription object.

### 3. Update Path Also Looks Up Subscription Without `_subscriberId`

In `apps/api/src/app/subscriptions/usecases/update-subscription/update-subscription.usecase.ts`, the subscription lookup uses:

- `identifier`
- `_environmentId`
- `_organizationId`
- `_topicId`
- optional context filter

It likewise omits subscriber ownership.

After resolving that subscription, the code updates the same stored subscription document, so the attacker can modify victim-owned subscription metadata such as `name`.

### 4. Delete Path Shows the Intended Boundary

As a useful negative control, `apps/api/src/app/inbox/usecases/delete-subscription/delete-subscription.usecase.ts` does include:

- `_subscriberId: command._subscriberId`

That route correctly rejects cross-subscriber deletion, which helps isolate the bug to the missing ownership checks on the read and update paths rather than a broader intended product behavior.

## Attack Preconditions

The attacker needs:

- a valid inbox subscriber JWT in the victim environment
- the victim subscription identifier
- the victim topic key

The attacker does not need:

- dashboard access
- API key access
- organization member access
- victim interaction

## Step-by-Step Reproduction

### Test Setup

Use one environment with two different inbox subscribers:

- victim subscriber
- attacker subscriber

As the victim subscriber, create a topic subscription:

```http
POST /v1/inbox/topics/<topicKey>/subscriptions HTTP/1.1
Authorization: Bearer <victim-subscriber-jwt>
Content-Type: application/json

{
  "identifier": "subscription-123",
  "name": "Victim Subscription"
}
```

### Reproduction A: Read Another Subscriber's Subscription

As the attacker subscriber, request:

```http
GET /v1/inbox/topics/<topicKey>/subscriptions/subscription-123 HTTP/1.1
Authorization: Bearer <attacker-subscriber-jwt>
```

Expected behavior:

- the request should return `204` or another access-denied result because the subscription belongs to a different subscriber

Actual behavior:

- the request succeeds
- the attacker receives the victim subscription details, including its identifier and name

### Reproduction B: Rename Another Subscriber's Subscription

As the attacker subscriber, request:

```http
PATCH /v1/inbox/topics/<topicKey>/subscriptions/subscription-123 HTTP/1.1
Authorization: Bearer <attacker-subscriber-jwt>
Content-Type: application/json

{
  "name": "Attacker Renamed"
}
```

Expected behavior:

- the request should be rejected because the attacker does not own the subscription

Actual behavior:

- the request succeeds
- the victim subscription record is updated

Verified follow-up:

- when the victim subscriber reads the same subscription again, the stored name is now `Attacker Renamed`

## End-to-End Verification

I verified this behavior end to end with a real API harness and persisted database state.

Verification artifact:

- `apps/api/src/app/inbox/e2e/subscription-ownership-idor.e2e.ts`

Observed test result:

- `3 passing`

The proof performs the following:

1. initialize one environment
2. create two distinct inbox subscriber sessions in that same environment
3. create a subscription as the victim subscriber
4. read that subscription as the attacker subscriber and verify the victim data is returned
5. update that subscription as the attacker subscriber and verify the change is persisted
6. attempt deletion as the attacker subscriber and verify that deletion is correctly rejected as a negative control

## Impact

This is a concrete subscriber-boundary break.

Practical consequences include:

- unauthorized reading of another subscriber's topic subscription metadata
- unauthorized tampering with another subscriber's subscription naming and preference container
- subscriber-to-subscriber abuse in shared environments where identifiers can be learned, logged, or guessed from application flows

If topic subscriptions are used to drive subscriber-specific preference logic, this can also undermine trust in per-subscriber workflow targeting and preference management.

## Why This Is In Scope

- this is a real authorization bypass between two different subscribers
- it has concrete confidentiality and integrity impact
- it is not DoS-only
- it does not rely on MITM, physical access, or social engineering
- it is not content spoofing without an attack path

## Recommended Fix

Enforce subscriber ownership on all inbox subscriber subscription routes.

Concrete remediation:

1. include the authenticated subscriber internal id in the read and update commands
2. require `_subscriberId` in the subscription lookup for:
   - `GetSubscription`
   - `UpdateSubscriptionUsecase`
3. review all inbox subscriber routes that currently authorize by identifier only and ensure they consistently enforce subscriber ownership
4. add regression tests proving one subscriber cannot read or update another subscriber's subscription, while legitimate same-subscriber access still works

## Suggested Retest

After the fix:

1. create a subscription as subscriber A
2. authenticate as subscriber B in the same environment
3. attempt:
   - `GET /v1/inbox/topics/:topicKey/subscriptions/:identifier`
   - `PATCH /v1/inbox/topics/:topicKey/subscriptions/:identifier`
4. confirm both are rejected or return no result
5. confirm subscriber A can still read and update their own subscription successfully

## References

- https://github.com/novuhq/novu/security/advisories/GHSA-32mr-9p6f-cx3x

Page: https://cve.now/GHSA-32MR-9P6F-CX3X

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
