Miggo Logo

CVE-2023-46729:
Sentry Next.js vulnerable to SSRF via Next.js SDK tunnel endpoint

6.1

CVSS Score

Basic Information

EPSS Score
-
Published
11/9/2023
Updated
11/17/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
@sentry/nextjsnpm>= 7.26.0, < 7.77.07.77.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from insecure regex patterns in the tunnel rewrite configuration. The commit diff shows the fix replaced '.' with strict patterns ([a-fA-F0-9] for orgid, \d* for projectid). The setUpTunnelRewriteRules function was responsible for creating these vulnerable rewrite rules that didn't properly validate input, allowing attackers to craft malicious URLs that bypassed domain restrictions. This matches the SSRF impact described in the advisory where arbitrary HTTP requests could be sent via manipulated parameters.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t *n uns*nitiz** input o* N*xt.js S*K tunn*l *n*point *llows s*n*in* *TTP r*qu*sts to *r*itr*ry URLs *n* r**l**tin* t** r*spons* ***k to t** us*r. T*is *oul* op*n *oor *or ot**r *tt**k v**tors: * *li*nt-si** vuln*r**iliti*s: XSS/*SR* in t**

Reasoning

T** vuln*r**ility st*ms *rom ins**ur* r***x p*tt*rns in t** tunn*l r*writ* *on*i*ur*tion. T** *ommit *i** s*ows t** *ix r*pl**** '.*' wit* stri*t p*tt*rns ([*-**-**-*]* *or or*i*, \** *or proj**ti*). T** s*tUpTunn*lR*writ*Rul*s *un*tion w*s r*sponsi*