All vulnerabilities

npm

CVE-2026-47675

Hono: Cookie helper does not sanitize sameSite and priority, allowing Set-Cookie injection

Severity
Medium 4.3
Published
4 Jun 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
4.12.21
Exploit chance
0.2% in the next 30 daysHigher than 12% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
HTTP response splitting (CWE-113)CWE-1287
Attack
Over the network · No login needed · Needs someone to click or open something
Attacker can
Change some data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Also known as
GHSA-3hrh-pfw6-9m5x
Sources
OSV.dev and GitHub

Description

The serialize() function in hono/cookie validates domain and path options against characters that corrupt Set-Cookie header syntax (;, \r, \n), but does not apply the same validation to sameSite and priority. An application that passes user-controlled input into either option may produce a Set-Cookie response header containing attacker-chosen additional attributes.

When constructing a Set-Cookie header value, serialize() appends the sameSite and priority option values directly into the output string after a presentation-only transformation (capitalizing the first character). Although the TypeScript type signature constrains these options to specific string literals, that constraint is not enforced at runtime; any string value, including one containing ; or line-feed characters, passes through unchanged.

The validation guard that rejects ;, \r, and \n from domain and path is not applied to sameSite or priority.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
hononpm · osv:npm:hono
  • Every version before 4.12.21

About hono

Weekly downloads (npm)
108,805,821npm, 16 Nov 2026

References