{"id":"CVE-2026-29086","aliases":["CVE-2026-29086","GHSA-5pq2-9x2x-5p6w"],"related":[],"kind":"vulnerability","state":"published","title":"Hono: Cookie Attribute Injection via Unsanitized domain and path in setCookie()","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe `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.\n\nBecause cookie attributes are delimited by semicolons, this could allow injection of additional cookie attributes if untrusted input was passed into these fields.\n\n## Details\n\n`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.\n\nIncluding `;`, `\\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.\n\nModern runtimes prevent full header injection via CRLF, so this issue is limited to attribute-level manipulation within a single `Set-Cookie` header.\n\nThe issue has been fixed by rejecting these characters in the `domain` and `path` options.\n\n## Impact\n\nAn attacker may be able to manipulate cookie attributes if an application passes user-controlled input directly into the `domain` or `path` options of `setCookie()`.\n\nThis could affect cookie scoping or security attributes depending on browser behavior. Exploitation requires application-level misuse of cookie options.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-03-04T19:49:14.000Z","modified":"2026-09-10T03:50:37.686Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-113","CWE-1113"],"affected":[{"ranges":[{"version":"< 4.12.4","status":"affected"}],"vendor":"honojs","product":"hono","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.12.4"}],"ecosystem":"npm","package":"hono","purl":"pkg:npm/hono","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.12.4"}],"vendor":"hono","product":"hono","cpe":"cpe:2.3:a:hono:hono:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/honojs/hono/security/advisories/GHSA-5pq2-9x2x-5p6w","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/honojs/hono/commit/44ae0c8cc4d5ab2bed529127a4ac72e1483ad073","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-29086","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/honojs/hono","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-03-05T15:29:14.844Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-29086","url":"https://www.cve.org/CVERecord?id=CVE-2026-29086","licence":"CVE Terms of Use","modified":"2026-03-05T15:42:10.524Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5pq2-9x2x-5p6w","url":"https://github.com/advisories/GHSA-5pq2-9x2x-5p6w","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:37.686Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-29086","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-29086","licence":"Public domain","modified":"2026-06-17T10:29:34.577Z"}],"updatedAt":"2026-11-25T22:59:15.234Z","epss":{"score":0.00276,"percentile":0.215,"date":"2026-12-01T12:00:22.000Z"}}