CVE-2026-25149: 
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-25149 is an Open Redirect vulnerability (CWE-601) in Qwik City's fixTrailingSlash middleware that allows remote attackers to redirect users to arbitrary protocol-relative URLs. It affects the @builder.io/qwik-city npm package in all versions prior to 1.19.0. The vulnerability was published on February 3, 2026, and patched in version 1.19.0. It carries a CVSS v3.1 score of 6.1 (Medium) and a CVSS v4.0 score of 2.7 (Low) (Github Advisory, Qwik Security Advisory).

Technical details

The root cause lies in the fixTrailingSlash middleware within Qwik City's default request handler (resolve-request-handlers.ts). When a Qwik City application is deployed on a runtime with a catch-all path (e.g., Bun) that does not automatically normalize URL paths, the middleware fails to validate pathnames beginning with // (protocol-relative URLs). An attacker can craft a request to a URL such as http://victim.com//attacker.com, which the middleware processes and issues a 301 redirect with a Location: //attacker.com header. Browsers interpret //attacker.com as a protocol-relative URL and redirect the user to the attacker's domain. The fix, applied in commit 9959eab, adds an explicit check to reject or sanitize pathnames starting with // before any redirect is issued (Qwik Security Advisory, Patch Commit).

Impact

Successful exploitation enables attackers to craft phishing links that appear to originate from a trusted Qwik City domain but silently redirect victims to attacker-controlled sites. This can facilitate credential theft, session token capture, and other social engineering attacks. There is no direct impact on the confidentiality or integrity of the vulnerable server itself; the primary risk is to end users who follow maliciously crafted links (Github Advisory).

Exploitability

No public proof-of-concept exploit code has been reported, and there is no evidence of active in-the-wild exploitation at this time. The vulnerability requires user interaction — a victim must click a crafted link — but requires no authentication or special privileges from the attacker. The EPSS score is approximately 0.044% (0.019% per GitHub Advisory), indicating a low probability of near-term exploitation. The CVE is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (Github Advisory).

Exploitation steps

  1. Reconnaissance: Identify publicly accessible Qwik City applications running on runtimes that do not normalize URL paths (e.g., Bun), using version information from package manifests or HTTP response headers to confirm versions prior to 1.19.0.
  2. Craft malicious URL: Construct a URL targeting the vulnerable application with a double-slash path, such as https://trusted-qwik-app.com//attacker.com or https://trusted-qwik-app.com////attacker.com.
  3. Trigger redirect: Send or share the crafted URL. The fixTrailingSlash middleware processes the request and issues a 301 Moved Permanently response with Location: //attacker.com (or //attacker.com/path).
  4. Browser interprets protocol-relative URL: The victim's browser receives the Location: //attacker.com header and redirects to https://attacker.com (inheriting the current protocol), landing the user on the attacker-controlled site.
  5. Phishing/token theft: The attacker presents a convincing clone of the legitimate application to harvest credentials, session tokens, or other sensitive information from the redirected user (Qwik Security Advisory, Patch Commit).

Indicators of compromise

  • Network: HTTP requests to Qwik City application URLs containing double-slash path segments (e.g., GET //attacker.com HTTP/1.1 or GET ////attacker.com HTTP/1.1); 301 responses with Location headers beginning with // (protocol-relative URLs).
  • Logs: Web server or application access logs showing requests with paths starting with // or multiple leading slashes; console warning messages matching the pattern Redirect URL //[...] is invalid, fixing to /[...] (present only in patched versions).
  • User Reports: Users reporting unexpected redirects to external domains after clicking links that appeared to belong to the legitimate application domain.

Mitigation and workarounds

Upgrade @builder.io/qwik-city to version 1.19.0 or later, which includes a fix that explicitly rejects or sanitizes pathnames starting with // before processing redirects (Qwik Security Advisory, Patch Commit). As a temporary workaround for environments where immediate patching is not possible, configure the runtime or a reverse proxy (e.g., Nginx, Cloudflare) to normalize URL paths and reject requests with double-slash prefixes before they reach the Qwik City application. Additionally, apply input validation at the edge to block or rewrite URLs matching the pattern ^//.

Additional resources


Source: This report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-gvwc-5hr5-44p8HIGH7.5
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026
GHSA-5jh3-w3fj-6758LOW3.7
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026
GHSA-5v8x-rm7w-m4c7LOW3.7
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026
GHSA-7pqp-3q23-mwr8LOW3.7
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026
GHSA-3qg4-7mq2-gm93MEDIUMN/A
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management