{"id":"CVE-2024-23340","aliases":["CVE-2024-23340","GHSA-rjq5-w47x-x359"],"related":[],"kind":"vulnerability","state":"published","title":"@hono/node-server can't handle \"double dots\" in URL","summary":"@hono/node-server is an adapter that allows users to run Hono applications on Node.js. Since v1.3.0, @hono/node-server has used its own Request object with `url` behavior that is unexpected. In the standard API, if the URL contains `..`, here called \"double dots\", the URL string returned by Request will be in the resolved path. However, the `url` in @hono/node-server's Request as does not resolve double dots, so `http://localhost/static/.. /foo.txt` is returned. This causes vulnerabilities when using `serveStatic`. Modern web browsers and a latest `curl` command resolve double dots on the client side, so this issue doesn't affect those using either of those tools. However, problems may occur if accessed by a client that does not resolve them. Version 1.4.1 includes the change to fix this issue. As a workaround, don't use `serveStatic`.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"@hono/node-server is an adapter that allows users to run Hono applications on Node.js. Since v1.3.0, @hono/node-server has used its own Request object with `url` behavior that is unexpected. In the standard API, if the URL contains `..`, here called \"double dots\", the URL string returned by Request will be in the resolved path. However, the `url` in @hono/node-server's Request as does not resolve double dots, so `http://localhost/static/.. /foo.txt` is returned. This causes vulnerabilities when using `serveStatic`. Modern web browsers and a latest `curl` command resolve double dots on the client side, so this issue doesn't affect those using either of those tools. However, problems may occur if accessed by a client that does not resolve them. Version 1.4.1 includes the change to fix this issue. As a workaround, don't use `serveStatic`.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nSince v1.3.0, we use our own Request object. This is great, but the `url` behavior is unexpected.\n\nIn the standard API, if the URL contains `..`, here called \"double dots\", the URL string returned by Request will be in the resolved path.\n\n```ts\nconst req = new Request('http://localhost/static/../foo.txt') // Web-standards\nconsole.log(req.url) // http://localhost/foo.txt\n```\n\nHowever, the `url` in our Request does not resolve double dots, so `http://localhost/static/.. /foo.txt` is returned.\n\n```ts\nconst req = new Request('http://localhost/static/../foo.txt')\nconsole.log(req.url) // http://localhost/static/../foo.txt\n```\n\nIt will pass unresolved paths to the web application. This causes vulnerabilities like #123 when using `serveStatic`.\n\nNote: Modern web browsers and a latest `curl` command resolve double dots on the client side, so it does not affect you if the user uses them. However, problems may occur if accessed by a client that does not resolve them.\n\n### Patches\n\n\"v1.4.1\" includes the change to fix this issue.\n\n### Workarounds\n\nDon't use `serveStatic`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"@hono/node-server es un adaptador que permite a los usuarios ejecutar aplicaciones Hono en Node.js. Desde v1.3.0, @hono/node-server ha utilizado su propio objeto Request con un comportamiento de `url` inesperado. En la API estándar, si la URL contiene `..`, aquí denominada \"puntos dobles\", la cadena de URL devuelta por la Solicitud estará en la ruta resuelta. Sin embargo, la `url` en la solicitud de @hono/node-server no resuelve los puntos dobles, por lo que se devuelve `http://localhost/static/.. /foo.txt`. Esto provoca vulnerabilidades al utilizar `serveStatic`. Los navegadores web modernos y el último comando `curl` resuelven los puntos dobles en el lado del cliente, por lo que este problema no afecta a quienes utilizan cualquiera de esas herramientas. Sin embargo, pueden ocurrir problemas si accede un cliente que no los resuelve. La versión 1.4.1 incluye el cambio para solucionar este problema. Como workaround, no utilice \"serveStatic\".","source":"nvd"}],"published":"2024-01-22T23:00:34.510Z","modified":"2026-09-10T03:50:05.180Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":">= 1.3.0, < 1.4.1","status":"affected"}],"vendor":"honojs","product":"node-server","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.3.0","status":"affected","fixed":"1.4.1"}],"ecosystem":"npm","package":"@hono/node-server","purl":"pkg:npm/%40hono/node-server","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.3.0","fixed":"1.4.1"}],"vendor":"hono","product":"node-server","cpe":"cpe:2.3:a:hono:node-server:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/honojs/node-server/security/advisories/GHSA-rjq5-w47x-x359","tags":["exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/honojs/node-server/commit/dd9b9a9b23e3896403c90a740e7f1f0892feb402","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/honojs/node-server/blob/8cea466fd05e6d2e99c28011fc0e2c2d3f3397c9/src/request.ts#L43-L45","tags":["product","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-23340","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/honojs/node-server","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-05-08T15:34:31.017Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-23340","url":"https://www.cve.org/CVERecord?id=CVE-2024-23340","licence":"CVE Terms of Use","modified":"2025-05-30T14:21:51.423Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rjq5-w47x-x359","url":"https://github.com/advisories/GHSA-rjq5-w47x-x359","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:05.180Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-23340","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-23340","licence":"Public domain","modified":"2026-06-17T07:12:37.777Z"}],"updatedAt":"2026-11-25T22:58:36.272Z","epss":{"score":0.00722,"percentile":0.55211,"date":"2026-12-01T12:00:22.000Z"}}