CVE-2023-50249: @sentry/astro Denial of Service Vulnerability
HIGHCVE-2023-50249 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting @sentry/astro libraries in the npm ecosystem. The issue involves sentry's astro sdk vulnerable to redos. Remediation is available by upgrading affected packages to version 7.87.0.
CVE-2023-50249 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2023-50249
To remediate this vulnerability, upgrade all affected @sentry/astro dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @sentry/astro@7.87.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @sentry/astro
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-50249, inspect your project dependencies using npm:
npm ls @sentry/astro
Analyze the terminal output to locate any version of @sentry/astro in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.87.0), your application is affected.
Note: The npm ls @sentry/astro command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In @sentry/astro, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-50249 Affected @sentry/astro Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@sentry/astro
|
npm |
≥ 7.78.0
< 7.87.0
|
7.87.0
|
References
Frequently Asked Questions
What is CVE-2023-50249?
Which @sentry/astro versions are affected?
What version fixes CVE-2023-50249?
Is @sentry/astro affected?
What is the CVSS score of CVE-2023-50249?
What CWE is associated with CVE-2023-50249?
How can I check npm dependencies for CVE-2023-50249?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x3v3-8xg8-8v72",
"modified" : "2023-12-28T22:03:19Z",
"published" : "2023-12-18T20:00:55Z",
"aliases" : [ "CVE-2023-50249" ],
"summary" : "Sentry's Astro SDK vulnerable to ReDoS",
"details" : "### Impact\nA ReDoS (Regular expression Denial of Service) vulnerability has been identified in Sentry's Astro SDK 7.78.0-7.86.0. Under certain conditions, this vulnerability allows an attacker to cause excessive computation times on the server, leading to denial of service (DoS).\n\nApplications that are using Sentry's Astro SDK are affected if:\n\n1. They're using Sentry instrumentation:\n - they have [manually registered](https://docs.sentry.io/platforms/javascript/guides/astro/manual-setup/#manually-add-server-instrumentation) Sentry Middleware (affected versions 7.78.0-7.86.0);\n - or [configured](https://docs.sentry.io/platforms/javascript/guides/astro/manual-setup/#configure-server-instrumentation) Astro in SSR (server) or hybrid mode, use Astro 3.5.0 and newer and didn’t [disable the automatic server instrumentation](https://docs.sentry.io/platforms/javascript/guides/astro/manual-setup/#disable-auto-server-instrumentation) (affected versions 7.82.0-7.86.0).\n2. They have configured routes with at least two path params (e.g. `/foo/[p1]/bar/[p2]`).\n\n### Patches\nThe problem has been patched in [@sentry/astro@7.87.0](https://www.npmjs.com/package/@sentry/astro/v/7.87.0).\nThe corresponding PR: https://github.com/getsentry/sentry-javascript/pull/9815\n\n### Workarounds\nWe strongly recommend upgrading to the latest SDK version. However, if it's not possible, the steps to mitigate the vulnerability without upgrade are:\n* [disable auto instrumentation](https://docs.sentry.io/platforms/javascript/guides/astro/manual-setup/#disable-auto-server-instrumentation) if you're using Astro 3.5.0 or newer\n* and remove the manually added Sentry middleware (if it was [added](https://docs.sentry.io/platforms/javascript/guides/astro/manual-setup/#manually-add-server-instrumentation) before).\n\nAfter these changes, Sentry error reporting will still be functional, but some details such as server-side transactions (and consequently, distributed traces between client and server) will be omitted. We therefore still recommend to update to 7.87.0 as soon as you can. \n\n### References\n* [Sentry docs: Manual Setup for Astro](https://docs.sentry.io/platforms/javascript/guides/astro/manual-setup/)\n* [Release notes: sentry-javascript 7.87.0](https://github.com/getsentry/sentry-javascript/releases/tag/7.87.0)\n* [npm: @sentry/astro@7.87.0](https://www.npmjs.com/package/@sentry/astro/v/7.87.0)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@sentry/astro"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.78.0"
}, {
"fixed" : "7.87.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/getsentry/sentry-javascript/security/advisories/GHSA-x3v3-8xg8-8v72"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-50249"
}, {
"type" : "WEB",
"url" : "https://github.com/getsentry/sentry-javascript/pull/9815"
}, {
"type" : "WEB",
"url" : "https://github.com/getsentry/sentry-javascript/commit/fe24eb5eefa9d27b14b2b6f9ebd1debca1c208fb"
}, {
"type" : "WEB",
"url" : "https://docs.sentry.io/platforms/javascript/guides/astro/manual-setup/#disable-auto-server-instrumentation"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/getsentry/sentry-javascript"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/@sentry/astro/v/7.87.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333", "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-12-18T20:00:55Z",
"nvd_published_at" : "2023-12-20T14:15:21Z"
}
}