Skip to main content
Menu
Advisories

Environment API Key Can Read Decrypted Integration Credentials

GHSA-RGR9-MPMJ-MPW8Published Updated GitHub

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.

Affected versions

References

GitHub · novuhq/novu