# CVE-2026-54286: Hono: Path traversal in `serve-static` on Windows via encoded backslash (`%5C`)

> Attackers can read protected static files on Windows hosts by using encoded backslashes in request paths, bypassing prefix-mounted middleware restrictions.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Jun 2026
- **Updated:** 23 Jun 2026
- **Also known as:** ECHO-d407-4169-3fe7, GHSA-wwfh-h76j-fc44, MINI-5f7j-4cwp-hp56, MINI-72rc-4r52-9p4p, MINI-96c2-c8cj-55xh, MINI-9whp-hqm8-57fr, MINI-g7q2-p3fh-59r5, MINI-gfm8-x9g3-x74v, MINI-qxf7-mjvh-v7pm, MINI-r64q-2wqf-vrwr, MINI-rfw7-r8fc-h97x, MINI-rr3r-2cv8-3c6q, MINI-wv4w-vmx8-jmrw, MINI-xr3v-r3hr-x252, ROOT-APP-NPM-CVE-2026-54286

## What is CVE-2026-54286?

CVE-2026-54286 is a medium-severity path traversal vulnerability in honojs hono, published on 22 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Hono is a Web application framework that provides support for any JavaScript runtime. Prior to 4.12.25, on Windows hosts, an encoded backslash (%5C) in the request path decodes to \, which the Windows path resolver treats as a separator. serve-static then resolves a single URL segment such as admin\secret.txt into a nested file under the root and serves it, letting an attacker read static files meant to be protected behind prefix-mounted middleware. This vulnerability is fixed in 4.12.25.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-54286?

2 open source packages ship an affected version, including hono.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `hono` | npm | All versions | 4.12.25 |
| `hono` | npm | All versions | 4.12.25 |

## How do I fix CVE-2026-54286?

Upgrade hono to 4.12.25 or later.

## Is CVE-2026-54286 being exploited?

There is no known exploitation of CVE-2026-54286 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-54286 and fix it if it is affected.

What it is: CVE-2026-54286 is a medium-severity path traversal vulnerability in honojs hono, published on 22 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-54286 in the wild and no public exploit code.

Affected packages and fixed versions:
- hono (npm): affected all versions; fixed in 4.12.25
- hono (npm): affected all versions; fixed in 4.12.25

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-54286/ (Markdown: https://insights.sbomify.com/CVE-2026-54286/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-54286
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-54286
- OSV: https://osv.dev/vulnerability/CVE-2026-54286

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-54286/
Summaries are generated and may contain mistakes; the official description above is the record.
