CVE-2026-29086
JSON

5.4medium

Hono: Cookie Attribute Injection via Unsanitized domain and path in setCookie()

Severity
5.4medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.28% (higher than 21% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-5pq2-9x2x-5p6w

Description

Hono is a Web application framework that provides support for any JavaScript runtime. Prior to version 4.12.4, the setCookie() utility did not validate semicolons (;), carriage returns (\r), or newline characters (\n) in the domain and path options when constructing the Set-Cookie header. Because cookie attributes are delimited by semicolons, this could allow injection of additional cookie attributes if untrusted input was passed into these fields. This issue has been patched in version 4.12.4.

Affected

Product or packageVersionsReported by
honojs hono< 4.12.4CVE List
hono (npm)before 4.12.4GitHub Advisory Database
hono honobefore 4.12.4NVD

All scores

GitHub_M5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
GitHub5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Classification

CWE-113CWE-1113

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Hono is a Web application framework that provides support for any JavaScript runtime. Prior to version 4.12.4, the setCookie() utility did not validate semicolons (;), carriage returns (\r), or newline characters (\n) in the domain and path options when constructing the Set-Cookie header. Because cookie attributes are delimited by semicolons, this could allow injection of additional cookie attributes if untrusted input was passed into these fields. This issue has been patched in version 4.12.4.

GitHub Advisory Database

Summary

The setCookie() utility did not validate semicolons (;), carriage returns (\r), or newline characters (\n) in the domain and path options when constructing the Set-Cookie header.

Because cookie attributes are delimited by semicolons, this could allow injection of additional cookie attributes if untrusted input was passed into these fields.

Details

setCookie() builds the Set-Cookie header by concatenating option values. While the cookie value itself is URL-encoded, the domain and path options were previously interpolated without rejecting unsafe characters.

Including ;, \r, or \n in these fields could result in unintended additional attributes (such as SameSite, Secure, Domain, or Path) being appended to the cookie header.

Modern runtimes prevent full header injection via CRLF, so this issue is limited to attribute-level manipulation within a single Set-Cookie header.

The issue has been fixed by rejecting these characters in the domain and path options.

Impact

An attacker may be able to manipulate cookie attributes if an application passes user-controlled input directly into the domain or path options of setCookie().

This could affect cookie scoping or security attributes depending on browser behavior. Exploitation requires application-level misuse of cookie options.

NVD (es)

Hono es un framework de aplicación web que proporciona soporte para cualquier entorno de ejecución de JavaScript. Antes de la versión 4.12.4, la utilidad setCookie() no validaba los puntos y coma (;), los retornos de carro (\r) o los caracteres de nueva línea (\n) en las opciones de dominio y ruta al construir la cabecera Set-Cookie. Dado que los atributos de las cookies están delimitados por puntos y coma, esto podría permitir la inyección de atributos de cookie adicionales si se pasaba una entrada no confiable a estos campos. Este problema ha sido parcheado en la versión 4.12.4.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-29086 changed 2026-03-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-5pq2-9x2x-5p6w changed 2026-09-10CC-BY-4.0
NVDCVE-2026-29086 changed 2026-06-17Public domain