CVE-2023-2307:
@builder.io/qwik-city Cross-Site Request Forgery vulnerability
4.7
CVSS ScoreBasic Information
CVE ID
GHSA ID
EPSS Score
-
CWE
Published
4/26/2023
Updated
11/5/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
@builder.io/qwik-city | npm | < 0.104.0 | 0.104.0 |
Vulnerability Intelligence
Miggo AI
Root 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.