CVE-2023-46729: @sentry/nextjs Sentry Next.js Vulnerable To SSRF Vulnerability
MODERATECVE-2023-46729 is a MODERATE (CVSS 6.1) sentry next.js vulnerable to ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting @sentry/nextjs libraries in the npm ecosystem. The issue involves sentry next.js vulnerable to ssrf via next.js sdk tunnel endpoint. Remediation is available by upgrading affected packages to version 7.77.0.
CVE-2023-46729 at a Glance
Security Impact
CVSS: 6.1
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:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2023-46729
To remediate this vulnerability, upgrade all affected @sentry/nextjs 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/nextjs@7.77.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @sentry/nextjs
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-46729, inspect your project dependencies using npm:
npm ls @sentry/nextjs
Analyze the terminal output to locate any version of @sentry/nextjs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.77.0), your application is affected.
Note: The npm ls @sentry/nextjs 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-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In @sentry/nextjs, 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-46729 Affected @sentry/nextjs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@sentry/nextjs
|
npm |
≥ 7.26.0
< 7.77.0
|
7.77.0
|
References
Frequently Asked Questions
What is CVE-2023-46729?
Which @sentry/nextjs versions are affected?
What version fixes CVE-2023-46729?
Is @sentry/nextjs affected?
What is the CVSS score of CVE-2023-46729?
What CWE is associated with CVE-2023-46729?
How can I check npm dependencies for CVE-2023-46729?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2rmr-xw8m-22q9",
"modified" : "2023-11-17T21:55:44Z",
"published" : "2023-11-09T22:03:44Z",
"aliases" : [ "CVE-2023-46729" ],
"summary" : "Sentry Next.js vulnerable to SSRF via Next.js SDK tunnel endpoint",
"details" : "### Impact\nAn unsanitized input of Next.js SDK tunnel endpoint allows sending HTTP requests to arbitrary URLs and reflecting the response back to the user. This could open door for other attack vectors:\n* client-side vulnerabilities: XSS/CSRF in the context of the trusted domain;\n* interaction with internal network;\n* read cloud metadata endpoints (AWS, Azure, Google Cloud, etc.);\n* local/remote port scan.\n\nThis issue only affects users who have [Next.js SDK tunneling feature](https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#configure-tunneling-to-avoid-ad-blockers) enabled.\n\n### Patches\nThe problem has been fixed in [sentry/nextjs@7.77.0](https://www.npmjs.com/package/@sentry/nextjs/v/7.77.0)\n\n### Workarounds\nDisable tunneling by removing the `tunnelRoute` option from Sentry Next.js SDK config — `next.config.js` or `next.config.mjs`.\n\n### References\n* [Sentry Next.js tunneling feature](https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#configure-tunneling-to-avoid-ad-blockers)\n* [The fix](https://github.com/getsentry/sentry-javascript/pull/9415)\n* [More Information](https://blog.sentry.io/next-js-sdk-security-advisory-cve-2023-46729/)\n\n### Credits\n* [Praveen Kumar](https://hackerone.com/mr_x_strange)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@sentry/nextjs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.26.0"
}, {
"fixed" : "7.77.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/getsentry/sentry-javascript/security/advisories/GHSA-2rmr-xw8m-22q9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-46729"
}, {
"type" : "WEB",
"url" : "https://github.com/getsentry/sentry-javascript/pull/9415"
}, {
"type" : "WEB",
"url" : "https://github.com/getsentry/sentry-javascript/commit/ddbda3c02c35aba8c5235e0cf07fc5bf656f81be"
}, {
"type" : "WEB",
"url" : "https://blog.sentry.io/next-js-sdk-security-advisory-cve-2023-46729"
}, {
"type" : "WEB",
"url" : "https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#configure-tunneling-to-avoid-ad-blockers"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/getsentry/sentry-javascript"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/@sentry/nextjs/v/7.77.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-11-09T22:03:44Z",
"nvd_published_at" : "2023-11-10T01:15:07Z"
}
}