Miggo Logo

CVE-2023-49785: NextChat has full-read SSRF and XSS vulnerability in /api/cors endpoint

9.1

CVSS Score
3.1

Basic Information

EPSS Score
0.99792%
Published
8/5/2024
Updated
8/5/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
nextchatnpm<= 2.11.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability centers around the /api/cors endpoint implementation which: 1) Accepts arbitrary URLs via path parameters 2) Forwards requests without proper validation 3) Returns full response contents 4) Supports multiple HTTP methods 5) Allows data: protocol usage. While exact implementation details aren't shown in public sources, Next.js architecture patterns suggest this would be implemented as a server-side API route handler. The critical impact (SSRF/XSS) directly stems from this endpoint's functionality as described in advisories and technical analysis.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

N*xt***t, *lso known *s ***t*PT-N*xt-W**, is * *ross-pl*t*orm ***t us*r int*r**** *or us* wit* ***t*PT. V*rsions *.**.* *n* prior *r* vuln*r**l* to s*rv*r-si** r*qu*st *or**ry *n* *ross-sit* s*riptin*. T*is vuln*r**ility *n**l*s r*** ****ss to int*rn

Reasoning

T** vuln*r**ility **nt*rs *roun* t** /*pi/*ors *n*point impl*m*nt*tion w*i**: *) ****pts *r*itr*ry URLs vi* p*t* p*r*m*t*rs *) *orw*r*s r*qu*sts wit*out prop*r v*li**tion *) R*turns *ull r*spons* *ont*nts *) Supports multipl* *TTP m*t*o*s *) *llows *