Sentry Next.js vulnerable to SSRF via Next.js SDK tunnel endpoint
Published 9 Nov 2023 · Updated 10 Sept 2026
Affected package
- Affected
- >=7.26.0 <7.77.0
- Fixed in
- 7.77.0
npm install @sentry/nextjs@7.77.0Details
Impact
An 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:
- client-side vulnerabilities: XSS/CSRF in the context of the trusted domain;
- interaction with internal network;
- read cloud metadata endpoints (AWS, Azure, Google Cloud, etc.);
- local/remote port scan.
This issue only affects users who have Next.js SDK tunneling feature enabled.
Patches
The problem has been fixed in sentry/nextjs@7.77.0
Workarounds
Disable tunneling by removing the tunnelRoute option from Sentry Next.js SDK config — next.config.js or next.config.mjs.
References
Credits
Is GHSA-2rmr-xw8m-22q9 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected @sentry/nextjs, and gives you the command that fixes it.
References
- Linkgithub.com/getsentry/sentry-javascript/security/advisories/GHSA-2rmr-xw8m-22q9
- Advisorynvd.nist.gov/vuln/detail/CVE-2023-46729
- Linkgithub.com/getsentry/sentry-javascript/pull/9415
- Linkgithub.com/getsentry/sentry-javascript/commit/ddbda3c02c35aba8c5235e0cf07fc5bf656f81be
- Linkblog.sentry.io/next-js-sdk-security-advisory-cve-2023-46729
- Linkdocs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#configure-tunneling-to-avoid-ad-blockers
- Packagegithub.com/getsentry/sentry-javascript
- Linkwww.npmjs.com/package/@sentry/nextjs/v/7.77.0
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.