Packages / @sentry/nextjs / Security

ModerateVulnerabilityGHSA-2rmr-xw8m-22q9CVE-2023-46729Published 9 Nov 2023

Sentry Next.js vulnerable to SSRF via Next.js SDK tunnel endpoint

Your version

Affected releases · @sentry/nextjs

  • 7.x7.26.0 – 7.76.0Fixed in 7.77.0

On 7.x, the newest line:

npm install @sentry/nextjs@7.77.0
Every release on a timeline
11.x
  1. Not affected

    11.0.0 – 11.9.0

    10 releases, latest

7.x
  1. Not affected

    7.0.0 – 7.25.0

    43 releases

  2. Affected

    7.26.0 – 7.76.0

    71 releases

  3. Fixed

    7.77.0 – 7.120.4

    58 releases

442 stable releases of @sentry/nextjs, oldest to newest, one row per major.

What happens

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