3.7low
Potential DoS when using ContextLines integration
- Severity
- 3.7low CVSS:3.1 by GitHub
- Published
- Last changed
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
| Product or package | Versions | Reported by |
|---|---|---|
| @sentry/node (npm) | from 8.10.0 before 8.49.0 | GitHub Advisory Database |
| @sentry/astro (npm) | from 8.10.0 before 8.49.0 | GitHub Advisory Database |
| @sentry/aws-serverless (npm) | from 8.10.0 before 8.49.0 | GitHub Advisory Database |
| @sentry/bun (npm) | from 8.10.0 before 8.49.0 | GitHub Advisory Database |
| @sentry/google-cloud-serverless (npm) | from 8.10.0 before 8.49.0 | GitHub Advisory Database |
| @sentry/nestjs (npm) | from 8.10.0 before 8.49.0 | GitHub Advisory Database |
| @sentry/nextjs (npm) | from 8.10.0 before 8.49.0 | GitHub Advisory Database |
| @sentry/nuxt (npm) | from 8.10.0 before 8.49.0 | GitHub Advisory Database |
| @sentry/remix (npm) | from 8.10.0 before 8.49.0 | GitHub Advisory Database |
| @sentry/solidstart (npm) | from 8.10.0 before 8.49.0 | GitHub Advisory Database |
| @sentry/sveltekit (npm) | from 8.10.0 before 8.49.0 | GitHub Advisory Database |
Classification
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-r5w7-f542-q2j4 changed 2025-01-28 | CC-BY-4.0 |