VDB
Sign up
MEDIUM

GHSA-6465-jgvq-jhgp

Sentry's sensitive headers are leaked when `sendDefaultPii` is set to `true`

Quick fix

GHSA-6465-jgvq-jhgp — @sentry/node: upgrade to the fixed version with the command below.

npm install @sentry/node@10.27.0

Details

### Impact In version 10.11.0, a change to how the SDK collects request data in Node.js applications caused certain incoming HTTP headers to be added as trace span attributes. When `sendDefaultPii: true` was set, a few headers that were previously redacted - including Authorization and Cookie - were unintentionally allowed through.

Sentry’s server-side scrubbing (handled by Sentry's Relay edge proxy) normally serves as a second layer of protection. However, because it relied on the same matching logic as the SDK, it also failed to catch these headers in this case.

Users may be impacted if:

1. Their Sentry SDK configuration has `sendDefaultPii` set to `true` 2. Their application uses one of the Node.js Sentry SDKs with version from `10.11.0` to `10.26.0` inclusively: - @sentry/astro - @sentry/aws-serverless - @sentry/bun - @sentry/google-cloud-serverless - @sentry/nestjs - @sentry/nextjs - @sentry/node - @sentry/node-core - @sentry/nuxt - @sentry/remix - @sentry/solidstart - @sentry/sveltekit

Users can check if their project was affected, by visiting Explore → Traces and searching for “http.request.header.authorization”, “http.request.header.cookie” or similar. Any potentially sensitive values will be specific to users' applications and configurations.

### Patches The issue has been patched in all Sentry JavaScript SDKs starting from the [10.27.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.27.0) version.

### Workarounds Sentry strongly encourage customers to upgrade the SDK to the latest available version, [10.27.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.27.0) or later. If it is not possible, consider setting `sendDefaultPii: false` to avoid unintentionally sending sensitive headers. See [here](https://docs.sentry.io/platforms/javascript/guides/node/#step-2-configure) for documentation.

### Resources * https://develop.sentry.dev/sdk/expected-features/data-handling/#sensitive-data * https://github.com/getsentry/sentry-javascript/releases/tag/10.11.0 * https://github.com/getsentry/sentry-javascript/pull/17475 * https://docs.sentry.io/platforms/javascript/guides/node/data-management/data-collected/#cookies

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/@sentry/node
Introduced in: 10.11.0Fixed in: 10.27.0
Fixnpm install @sentry/node@10.27.0
npm/@sentry/astro
Introduced in: 10.11.0Fixed in: 10.27.0
Fixnpm install @sentry/astro@10.27.0
npm/@sentry/aws-serverless
Introduced in: 10.11.0Fixed in: 10.27.0
Fixnpm install @sentry/aws-serverless@10.27.0
npm/@sentry/bun
Introduced in: 10.11.0Fixed in: 10.27.0
Fixnpm install @sentry/bun@10.27.0
npm/@sentry/google-cloud-serverless
Introduced in: 10.11.0Fixed in: 10.27.0
Fixnpm install @sentry/google-cloud-serverless@10.27.0
npm/@sentry/nestjs
Introduced in: 10.11.0Fixed in: 10.27.0
Fixnpm install @sentry/nestjs@10.27.0
npm/@sentry/nextjs
Introduced in: 10.11.0Fixed in: 10.27.0
Fixnpm install @sentry/nextjs@10.27.0
npm/@sentry/node-core
Introduced in: 10.11.0Fixed in: 10.27.0
Fixnpm install @sentry/node-core@10.27.0
npm/@sentry/nuxt
Introduced in: 10.11.0Fixed in: 10.27.0
Fixnpm install @sentry/nuxt@10.27.0
npm/@sentry/remix
Introduced in: 10.11.0Fixed in: 10.27.0
Fixnpm install @sentry/remix@10.27.0
npm/@sentry/solidstart
Introduced in: 10.11.0Fixed in: 10.27.0
Fixnpm install @sentry/solidstart@10.27.0
npm/@sentry/sveltekit
Introduced in: 10.11.0Fixed in: 10.27.0
Fixnpm install @sentry/sveltekit@10.27.0

References