CVE-2026-49456: Waku Waku Has An Open Redirect Vulnerability

LOW
Advisory Identifier: GHSA-43fc-v873-qw85
CVSS 3.1
CWE-601
Published
Advisory Summary

CVE-2026-49456 is a LOW (CVSS 3.1) waku has an open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Waku libraries in the npm ecosystem. The issue involves waku has an open redirect via `unstable_redirect` helper. Remediation is available by upgrading affected packages to version 1.0.0-beta.1.

CVE-2026-49456 at a Glance

CVE Identifier CVE-2026-49456
GHSA Identifier GHSA-43fc-v873-qw85
Severity LOW
CVSS v3.1 Base Score 3.1
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Waku
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 3.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-49456

To remediate this vulnerability, upgrade all affected Waku dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

waku fixed: 1.0.0-beta.1
npm install waku@1.0.0-beta.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls waku

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-49456, inspect your project dependencies using npm:

npm ls waku

Analyze the terminal output to locate any version of Waku in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0-beta.1), your application is affected.

Note: The npm ls waku command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Waku, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The `unstable_redirect()` helper exported from `waku/router/server` (`packages/waku/src/router/define-router.tsx:156–161`) accepts an arbitrary string and reflects it unchanged into the HTTP `Location` response header with no URL validation, scheme restriction, or path-only enforcement. Any application that passes user-controlled input to this helper — the natural pattern documented in the JSDoc and official fixtures — is vulnerable to open redirect attacks. An attacker who convinces a victim to click a crafted link can silently redirect the browser to an arbitrary external domain, enabling phishing, credential harvesting, and OAuth token theft. Additionally, scheme-relative URLs (`//evil.example/`) bypass naive `https?://`-only allow-list filters that developers might add as ad-hoc mitigations. Dynamic PoC confirmed against **waku 1.0.0-beta.0** (commit `8e9f542`) in an isolated Docker environment. Two independent dynamic runs produced identical results. --- ## Root Cause `packages/waku/src/router/define-router.tsx:156–161`: ```ts export function unstable_redirect( location: string, // only URL `pathname` is supported. status: 303 | 307 | 308 = 307, ): never { throw createCustomError('Redirect', { status, location }); } ``` The JSDoc comment states "only URL `pathname` is supported", but this constraint is expressed as documentation only — the function performs **no validation**. The `location` value propagates via `createCustomError` (`custom-errors.ts:22–26`) into an error digest, is recovered by `getErrorInfo` in the request handler (`handler.ts:79–89`), and reflected directly into `headers.location` of the outgoing `Response` with no sanitization: ```ts if (info?.location) { headers.location = info.location; // handler.ts:87 — unvalidated reflection } return new Response(body, { status, headers }); ``` --- ## Trigger (one-line summary) Any developer-supplied user input passed to `unstable_redirect()` is reflected unchanged into the HTTP `Location` header, enabling navigation to an attacker-controlled domain. --- ## Affected Entry Surfaces - `unstable_redirect(location, status?)` — `waku/router/server` public export - Any page/route component that passes `searchParams`, `query`, or other user- controlled strings to `unstable_redirect` (the standard post-login or callback redirect pattern) - All waku adapters (Node.js, Cloudflare Workers, Vercel Edge, Deno) share the same `handler.ts` reflection path; cross-runtime CRLF parity is unaudited (see note below) --- ## Additional Defense-in-Depth Concern On Node.js, CRLF injection via the `Location` header is rejected by `node:_http_outgoing.setHeader` (`ERR_INVALID_CHAR`). This defense is **platform-specific** and not present in the waku source. Cloudflare Workers, Deno Deploy, and other edge runtimes have not been verified to offer equivalent protection. A cross-runtime audit is recommended. --- ## Suggested Fix Outline Validate the `location` argument inside `unstable_redirect` before the error is thrown: reject any value that does not begin with a single `/` (no `//`), and reject any value containing control characters (`\x00`–`\x1f`). An opt-in allow-list for intentional cross-origin redirects can be provided via a framework configuration option. --- ## Disclosure | Field | Value | |------------------|------------------------------------| | Reporter | j0hndo (`dohyun4466@gmail.com`) | | Discovery date | 2026-05-17 | | Embargo | 90 days from acknowledgment | | Patched version | Not yet available | | Public references| CWE-601; OWASP A01:2021 |

CVE-2026-49456 Affected Waku Versions

1 component(s)
Fixed Versions:
1.0.0-beta.1
Product / Package Ecosystem Affected Versions Fixed Version
waku
npm
< 1.0.0-beta.1
1.0.0-beta.1

References

Frequently Asked Questions

What is CVE-2026-49456?
CVE-2026-49456 is a security vulnerability in Waku involving Waku has an Open Redirect via `unstable_redirect` Helper under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Waku versions are affected?
Affected versions include releases prior to 1.0.0-beta.1 across affected packages: waku.
What version fixes CVE-2026-49456?
Upgrading to 1.0.0-beta.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is waku affected?
Yes, waku is affected in releases prior to 1.0.0-beta.1. Upgrade your dependency to 1.0.0-beta.1 or later.
What is the CVSS score of CVE-2026-49456?
CVE-2026-49456 has a CVSS v3.1 base score of 3.1 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-49456?
CVE-2026-49456 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check npm dependencies for CVE-2026-49456?
Run the dependency tree command: 'npm ls waku'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-43fc-v873-qw85",
  "modified" : "2026-07-08T20:30:21Z",
  "published" : "2026-07-08T20:30:21Z",
  "aliases" : [ "CVE-2026-49456" ],
  "summary" : "Waku has an Open Redirect via `unstable_redirect` Helper",
  "details" : "## Summary\n\nThe `unstable_redirect()` helper exported from `waku/router/server` (`packages/waku/src/router/define-router.tsx:156–161`) accepts an arbitrary string and reflects it unchanged into the HTTP `Location` response header with no URL validation, scheme restriction, or path-only enforcement. Any application that passes user-controlled input to this helper — the natural pattern documented in the JSDoc and official fixtures — is vulnerable to open redirect attacks. An attacker who convinces a victim to click a crafted link can silently redirect the browser to an arbitrary external domain, enabling phishing, credential harvesting, and OAuth token theft. Additionally, scheme-relative URLs (`//evil.example/`) bypass naive `https?://`-only allow-list filters that developers might add as ad-hoc mitigations.\n\nDynamic PoC confirmed against **waku 1.0.0-beta.0** (commit `8e9f542`) in an isolated Docker environment. Two independent dynamic runs produced identical results.\n\n---\n\n## Root Cause\n\n`packages/waku/src/router/define-router.tsx:156–161`:\n\n```ts\nexport function unstable_redirect(\n  location: string, // only URL `pathname` is supported.\n  status: 303 | 307 | 308 = 307,\n): never {\n  throw createCustomError('Redirect', { status, location });\n}\n```\n\nThe JSDoc comment states \"only URL `pathname` is supported\", but this constraint is expressed as documentation only — the function performs **no validation**. The `location` value propagates via `createCustomError` (`custom-errors.ts:22–26`) into an error digest, is recovered by `getErrorInfo` in the request handler (`handler.ts:79–89`), and reflected directly into `headers.location` of the outgoing `Response` with no sanitization:\n\n```ts\nif (info?.location) {\n  headers.location = info.location;   // handler.ts:87 — unvalidated reflection\n}\nreturn new Response(body, { status, headers });\n```\n\n---\n\n## Trigger (one-line summary)\n\nAny developer-supplied user input passed to `unstable_redirect()` is reflected unchanged into the HTTP `Location` header, enabling navigation to an attacker-controlled domain.\n\n---\n\n## Affected Entry Surfaces\n\n- `unstable_redirect(location, status?)` — `waku/router/server` public export\n- Any page/route component that passes `searchParams`, `query`, or other user-\n  controlled strings to `unstable_redirect` (the standard post-login or callback\n  redirect pattern)\n- All waku adapters (Node.js, Cloudflare Workers, Vercel Edge, Deno) share the same\n  `handler.ts` reflection path; cross-runtime CRLF parity is unaudited (see note\n  below)\n\n---\n\n## Additional Defense-in-Depth Concern\n\nOn Node.js, CRLF injection via the `Location` header is rejected by `node:_http_outgoing.setHeader` (`ERR_INVALID_CHAR`). This defense is **platform-specific** and not present in the waku source. Cloudflare Workers, Deno Deploy, and other edge runtimes have not been verified to offer equivalent protection. A cross-runtime audit is recommended.\n\n---\n\n## Suggested Fix Outline\n\nValidate the `location` argument inside `unstable_redirect` before the error is thrown: reject any value that does not begin with a single `/` (no `//`), and reject any value containing control characters (`\\x00`–`\\x1f`). An opt-in allow-list for intentional cross-origin redirects can be provided via a framework configuration option.\n\n---\n\n## Disclosure\n\n| Field            | Value                              |\n|------------------|------------------------------------|\n| Reporter         | j0hndo (`dohyun4466@gmail.com`)    |\n| Discovery date   | 2026-05-17                         |\n| Embargo          | 90 days from acknowledgment        |\n| Patched version  | Not yet available                  |\n| Public references| CWE-601; OWASP A01:2021            |",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "waku"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.0-beta.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.0.0-beta.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/wakujs/waku/security/advisories/GHSA-43fc-v873-qw85"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wakujs/waku"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wakujs/waku/releases/tag/v1.0.0-beta.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-08T20:30:21Z",
    "nvd_published_at" : null
  }
}