cve.bz

CVE-2026-126344

@hono/node-server: WebSocket upgrade request-target starting with `//` replaces the host in `c.req.url`, bypassing `Origin` checks

5.4 medium

Medium (5.4) in honojs node-server.

On this page
@hono/node-server allows running the Hono application on Node.js. From 2.0.0 until 2.1.6, the WebSocket upgrade path resolves a raw request-target beginning with // against a base URL built from the Host header, causing the WHATWG URL parser to treat the request-target as a network-path reference and replace the host in c.req.url. Routing still uses the local WebSocket path, so an application that compares the Origin header with the origin of c.req.url, including checks implemented with csrf(), compares an attacker's origin with itself and accepts the connection. A page on another site can consequently open a WebSocket with the victim's cookies and read and send messages when the application uses upgradeWebSocket and trusts the host in c.req.url. Ordinary HTTP requests are not affected. This issue is fixed in version 2.1.6.

Severity

CVSS 3.1

5.4 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
CWE
CWE-1385 Missing Origin Validation in WebSockets
Published
Assigned by
GitHub_M (CNA)
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-126344 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-126344?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-126344?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-126344 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-126344

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-126344](https://cve.bz/cve/badge/CVE-2026-126344.svg)](https://cve.bz/cve/CVE-2026-126344)

HTML:

<a href="https://cve.bz/cve/CVE-2026-126344"><img src="https://cve.bz/cve/badge/CVE-2026-126344.svg" alt="CVE-2026-126344"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
honojs node-server>= 2.0.0, < 2.1.6

References

Check your stackJSON