NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
LOW severity

Potential DoS when using ContextLines integrationGHSA-r5w7-f542-q2j4

LOWFix: getsentry/sentry-javascript#14997

GHSA-r5w7-f542-q2j4 is a low-severity (CVSS 3.7) vulnerability in @sentry/node. A fix is available for @sentry/node — see the affected versions and patch details below.

Published
Updated
Affected
11 pkgs
Patched
11 / 11
Exploits
None indexed
Exploitation data as of Jan 28, 2025 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

11 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

3Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@sentry/nodenpm
54.8Mdownloads / week
@sentry/astronpm
218Kdownloads / week
@sentry/aws-serverlessnpm
1.2Mdownloads / week

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

Affected Packages

11 total 11 fixed
EcosystemPackageVulnerable rangeFix
📦npm@sentry/node≥ 8.10.0&&< 8.49.08.49.0npm install @sentry/node@8.49.0
📦npm@sentry/astro≥ 8.10.0&&< 8.49.08.49.0npm install @sentry/astro@8.49.0
📦npm@sentry/aws-serverless≥ 8.10.0&&< 8.49.08.49.0npm install @sentry/aws-serverless@8.49.0
📦npm@sentry/bun≥ 8.10.0&&< 8.49.08.49.0npm install @sentry/bun@8.49.0
📦npm@sentry/google-cloud-serverless≥ 8.10.0&&< 8.49.08.49.0npm install @sentry/google-cloud-serverless@8.49.0
📦npm@sentry/nestjs≥ 8.10.0&&< 8.49.08.49.0npm install @sentry/nestjs@8.49.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @sentry/node, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update @sentry/node to 8.49.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-r5w7-f542-q2j4 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Frequently Asked Questions

### Impact The [ContextLines integration](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/contextlines/) 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 (`@sen
O3 Security · Impact-Aware SCA

Is GHSA-r5w7-f542-q2j4 in your dependencies?

Find it across npm, including transitive dependencies.

Potential DoS when using ContextLines integration