Miggo Logo

CVE-2023-2307:
@builder.io/qwik-city Cross-Site Request Forgery vulnerability

4.7

CVSS Score

Basic Information

EPSS Score
-
Published
4/26/2023
Updated
11/5/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
@builder.io/qwik-citynpm< 0.104.00.104.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from how URLs were constructed using new URL() with unsanitized user input. The original implementation in getUrl didn't handle protocol-relative URLs (starting with //) or backslashes properly, allowing malicious paths to be interpreted as absolute URLs. The fix introduced a normalizeUrl function that replaces double slashes and backslashes before URL construction, which was added to prevent this CSRF bypass vector. The test cases in http.unit.ts explicitly demonstrate how the vulnerable version would have incorrectly resolved '//attacker.com' to an external domain rather than a path under the application's origin.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*ross-Sit* R*qu*st *or**ry (*SR*) in *it*u* r*pository *uil**rio/qwik prior to *.***.*.

Reasoning

T** vuln*r**ility st*mm** *rom *ow URLs w*r* *onstru*t** usin* n*w URL() wit* uns*nitiz** us*r input. T** ori*in*l impl*m*nt*tion in **tUrl *i*n't **n*l* proto*ol-r*l*tiv* URLs (st*rtin* wit* //) or ***ksl*s**s prop*rly, *llowin* m*li*ious p*t*s to *