{"id":"GHSA-q5qw-h33p-qvwr","revision":"26aaf4116f3449ce83f67fa6b3d0cd07","records":[{"revision":"26aaf4116f3449ce83f67fa6b3d0cd07","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-q5qw-h33p-qvwr","aliases":["CVE-2026-29045"],"title":"Hono vulnerable to arbitrary file access via serveStatic vulnerability ","description":"## Summary\n\nWhen using `serveStatic` together with route-based middleware protections (e.g. `app.use('/admin/*', ...)`), inconsistent URL decoding allowed protected static resources to be accessed without authorization.\n\nThe router used `decodeURI`, while `serveStatic` used `decodeURIComponent`. This mismatch allowed paths containing encoded slashes (`%2F`) to bypass middleware protections while still resolving to the intended filesystem path.\n\n\n## Details\n\nThe routing layer preserved `%2F` as a literal string, while `serveStatic` decoded it into `/` before resolving the file path.\n\nExample:\n\nRequest: `/admin%2Fsecret.html`\n\n- Router sees: `/admin%2Fsecret.html` → does not match `/admin/*`\n- Static handler resolves: `/admin/secret.html`\n\nAs a result, static files under the configured static root could be served without triggering route-based protections.\n\nThis only affects applications that both:\n\n- Protect subpaths using route-based middleware, and\n- Serve files from the same static root using `serveStatic`.\n\nThis does **not** allow access outside the static root and is **not** a path traversal vulnerability.\n\n\n## Impact\n\nAn unauthenticated attacker could bypass route-based authorization for protected static resources by supplying paths containing encoded slashes.\n\nApplications relying solely on route-based middleware to protect static subpaths may have exposed those resources.","state":0,"publishedAt":"2026-03-04T19:48:00+00:00","modifiedAt":"2026-09-10T03:50:40.4719506+00:00","affected":[{"ecosystem":"npm","name":"hono","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.12.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/honojs/hono/security/advisories/GHSA-q5qw-h33p-qvwr","https://nvd.nist.gov/vuln/detail/CVE-2026-29045","https://github.com/honojs/hono/commit/6a0607a929d888893f0c91d92dce2fcfdb3662a3","https://github.com/honojs/hono"],"sourceUrl":"https://github.com/advisories/GHSA-q5qw-h33p-qvwr","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-q5qw-h33p-qvwr","identifiers":["GHSA-q5qw-h33p-qvwr","CVE-2026-29045"]},"retained":false,"historicalAffected":[]}],"coverage":[]}