# GHSA-RGR9-MPMJ-MPW8: Environment API Key Can Read Decrypted Integration Credentials

- Database: GitHub
- Severity: medium (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

# Environment API Key Can Read Decrypted Integration Credentials


## Executive Summary

Novu exposes `GET /v1/integrations` and `GET /v1/integrations/active` through `@ExternalApiAccessible()`. When the caller authenticates with an environment API key, the auth layer grants `ALL_PERMISSIONS`, which makes the integrations controller set `returnCredentials=true`.

The downstream listing flow then decrypts and returns each integration's stored `credentials` object in clear form.

I verified this end to end: after creating a Mailgun integration with known credentials, I used only the environment API key to call both list endpoints, and the API returned the exact cleartext `apiKey`, `secretKey`, and `domain`.

This is a real provider credential leakage issue. The API key caller gains direct access to the stored secrets Novu uses to authenticate to third-party providers.

## Vulnerability Classification

- Category: broken access control / secret disclosure
- Boundary crossed:
  - environment API key caller to integration credential material
  - runtime/event API secret to provider administration secret
- Primary impacts:
  - confidentiality
  - integrity

## Security Expectation

An environment API key should not be able to retrieve decrypted integration credentials unless that behavior is explicitly intended and scoped as provider-secret administration capability.

More concretely:

- API-key callers should not receive cleartext `credentials` from integration listing routes
- routes intended for general external API use should not double as secret export endpoints
- provider credential visibility should remain separated from environment API key runtime access

## Affected Functionality

Verified vulnerable endpoints:

- `GET /v1/integrations`
- `GET /v1/integrations/active`

Relevant code areas:

- `apps/api/src/app/integrations/integrations.controller.ts`
- `apps/api/src/app/integrations/usecases/get-integrations/get-integrations.usecase.ts`
- `libs/application-generic/src/usecases/get-active-integration/get-active-integration.usecase.ts`
- `libs/application-generic/src/usecases/get-decrypted-integrations/get-decrypted-integrations.usecase.ts`
- `apps/api/src/app/auth/services/community.auth.service.ts`

Verified proof file:

- `apps/api/src/app/integrations/e2e/api-key-integration-credential-leak.e2e.ts`

## Root Cause Summary

The issue comes from combining three behaviors:

1. integration list routes are marked `@ExternalApiAccessible()`
2. API-key authentication returns a `UserSessionData` object with `ALL_PERMISSIONS`
3. integration listing passes `returnCredentials=true`, causing the usecase to decrypt and return `integration.credentials`

That means an environment API key is treated like a privileged operator for integration read routes, and the response includes cleartext provider secrets with no redaction.

## References

- https://github.com/novuhq/novu/security/advisories/GHSA-rgr9-mpmj-mpw8

Page: https://cve.now/GHSA-RGR9-MPMJ-MPW8

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