Hono vulnerable to Restricted Directory Traversal in serveStatic with deno
cve-program · CVE-2024-32869
PublishedHono is a Web application framework that provides support for any JavaScript runtime. Prior to version 4.2.7, when using serveStatic with deno, it is possible to traverse the directory where `main.ts` is located. This can result in retrieval of unexpected files. Version 4.2.7 contains a patch for the issue.
Read the publisher's advisoryeuvd · EUVD-2024-1083
PublishedHono is a Web application framework that provides support for any JavaScript runtime. Prior to version 4.2.7, when using serveStatic with deno, it is possible to traverse the directory where `main.ts` is located. This can result in retrieval of unexpected files. Version 4.2.7 contains a patch for the issue.
Read the publisher's advisorynvd · CVE-2024-32869
PublishedHono is a Web application framework that provides support for any JavaScript runtime. Prior to version 4.2.7, when using serveStatic with deno, it is possible to traverse the directory where `main.ts` is located. This can result in retrieval of unexpected files. Version 4.2.7 contains a patch for the issue.
Read the publisher's advisoryosv · GHSA-3mpf-rcc7-5347
Published### Summary When using serveStatic with deno, it is possible to directory traverse where main.ts is located. My environment is configured as per this tutorial https://hono.dev/getting-started/deno ### PoC ```bash $ tree . ├── deno.json ├── deno.lock ├── main.ts ├── README.md └── static └── a.txt ``` source ```jsx import { Hono } from 'https://deno.land/x/[email protected]/mod.ts' import { serveStatic } from 'https://deno.land/x/[email protected]/middleware.ts' const app = new Hono() app.use('/static/*', serveStatic({ root: './' })) Deno.serve(app.fetch) ``` request ```bash curl localhost:8000/static/%2e%2e/main.ts ``` response is content of main.ts ### Impact Unexpected files are retrieved.
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2024-32869 · CVE overview and exploitation status
cve-program · CVE-2024-32869
- https://github.com/honojs/hono/security/advisories/GHSA-3mpf-rcc7-5347
- https://github.com/honojs/hono/commit/92e65fbb6e5e7372650e7690dbd84938432d9e65
euvd · EUVD-2024-1083
- https://github.com/honojs/hono/security/advisories/GHSA-3mpf-rcc7-5347
- https://github.com/honojs/hono/commit/92e65fbb6e5e7372650e7690dbd84938432d9e65
nvd · CVE-2024-32869
- https://github.com/honojs/hono/commit/92e65fbb6e5e7372650e7690dbd84938432d9e65
- https://github.com/honojs/hono/security/advisories/GHSA-3mpf-rcc7-5347
osv · GHSA-3mpf-rcc7-5347
Related changes
Linked by CVE identifierNo related changes are available here.