GHSA-R5W7-F542-Q2J4
Potential DoS when using ContextLines integration
Overview
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
Source: OX vulnerability database
Severity
3.7 · LOW
CVSS 3.1 base score, scored by GitHub.
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Affected packages · 11
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| npm | @sentry/astro | >=8.10.0, <8.49.0 | 8.49.0 |
| npm | @sentry/aws-serverless | >=8.10.0, <8.49.0 | 8.49.0 |
| npm | @sentry/bun | >=8.10.0, <8.49.0 | 8.49.0 |
| npm | @sentry/google-cloud-serverless | >=8.10.0, <8.49.0 | 8.49.0 |
| npm | @sentry/nestjs | >=8.10.0, <8.49.0 | 8.49.0 |
| npm | @sentry/nextjs | >=8.10.0, <8.49.0 | 8.49.0 |
| npm | @sentry/node | >=8.10.0, <8.49.0 | 8.49.0 |
| npm | @sentry/nuxt | >=8.10.0, <8.49.0 | 8.49.0 |
| npm | @sentry/remix | >=8.10.0, <8.49.0 | 8.49.0 |
| npm | @sentry/solidstart | >=8.10.0, <8.49.0 | 8.49.0 |
| npm | @sentry/sveltekit | >=8.10.0, <8.49.0 | 8.49.0 |
Open a package to see all its vulnerabilities.
Operating systems
No Linux distribution reports this ID.
References
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.