Skip to content

GHSA-r5w7-f542-q2j4 Potential DoS when using ContextLines integration

LowCVSS 3.7
Published
Updated
Exploit status
No public exploit known
Technology
Cloud Platforms

Description

Impact

The ContextLines integration uses readable streams to more efficiently use memory when reading files. The ContextLines integration is used to attach source context to outgoing events.

The stream was not explicitly closed after use. This could lead to excessive amounts of file handles open on the system and potentially lead to a Denial of Service (DoS).

The ContextLines integration is enabled by default in the Node SDK (@sentry/node) and SDKs that run in Node.js environments (@sentry/astro, @sentry/aws-serverless, @sentry/bun, @sentry/google-cloud-serverless, @sentry/nestjs, @sentry/nextjs, @sentry/nuxt, @sentry/remix, @sentry/solidstart, @sentry/sveltekit).

Patches

Users should upgrade to version 8.49.0 or higher.

Workarounds

To remediate this issue in affected versions without upgrading to version 8.49.0 and above you can disable the ContextLines integration. See the docs for more details.

Sentry.init({
  // ...
  integrations: function (integrations) {
    // integrations will be all default integrations
    return integrations.filter(function (integration) {
      return integration.name !== "ContextLines";
    });
  },
});

If you disable the ContextLines integration, you will lose source context on your error events.

References

Upgrade path

11 packages: 11 fixed.

PackageAffectedFixed inStatus
sentry @sentry/astro(npm) >= 8.10.0, < 8.49.0 8.49.0 Fixed
sentry @sentry/aws-serverless(npm) >= 8.10.0, < 8.49.0 8.49.0 Fixed
sentry @sentry/bun(npm) >= 8.10.0, < 8.49.0 8.49.0 Fixed
sentry @sentry/google-cloud-serverless(npm) >= 8.10.0, < 8.49.0 8.49.0 Fixed
sentry @sentry/nestjs(npm) >= 8.10.0, < 8.49.0 8.49.0 Fixed
sentry @sentry/nextjs(npm) >= 8.10.0, < 8.49.0 8.49.0 Fixed
sentry @sentry/node(npm) >= 8.10.0, < 8.49.0 8.49.0 Fixed
sentry @sentry/nuxt(npm) >= 8.10.0, < 8.49.0 8.49.0 Fixed
sentry @sentry/remix(npm) >= 8.10.0, < 8.49.0 8.49.0 Fixed
sentry @sentry/solidstart(npm) >= 8.10.0, < 8.49.0 8.49.0 Fixed
sentry @sentry/sveltekit(npm) >= 8.10.0, < 8.49.0 8.49.0 Fixed

Affected products

ProductAffected versionsFixed in
sentry @sentry/node(npm) >= 8.10.0, < 8.49.0 8.49.0
sentry @sentry/astro(npm) >= 8.10.0, < 8.49.0 8.49.0
sentry @sentry/aws-serverless(npm) >= 8.10.0, < 8.49.0 8.49.0
sentry @sentry/bun(npm) >= 8.10.0, < 8.49.0 8.49.0
sentry @sentry/google-cloud-serverless(npm) >= 8.10.0, < 8.49.0 8.49.0
sentry @sentry/nestjs(npm) >= 8.10.0, < 8.49.0 8.49.0
sentry @sentry/nextjs(npm) >= 8.10.0, < 8.49.0 8.49.0
sentry @sentry/nuxt(npm) >= 8.10.0, < 8.49.0 8.49.0
sentry @sentry/remix(npm) >= 8.10.0, < 8.49.0 8.49.0
sentry @sentry/solidstart(npm) >= 8.10.0, < 8.49.0 8.49.0
sentry @sentry/sveltekit(npm) >= 8.10.0, < 8.49.0 8.49.0

References