CVE-2026-39408: Hono path traversal in toSSG during static site generation

CVE-2026-39408 · Severity: high · CVSS 7.5 · Published 2026-04-08

Hono is a web application framework used to build and deploy JavaScript-based websites. A security flaw in its static site generation tool allows an attacker to manipulate file paths, potentially writing files to unauthorized locations on the server during the build process. This could lead to the overwriting of sensitive system files or the corruption of the website's deployment artifacts.

Technologies: hono (npm). Vendors: npm.

Quick answers

Is CVE-2026-39408 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-39408 being exploited in the wild.
How severe is CVE-2026-39408?
High severity, with a CVSS score of 7.5, published 8 April 2026.
Which products and versions are affected?
hono (npm) SEMVER:introduced=4.0.0,fixed=4.12.12.
Is there a fix for CVE-2026-39408?
Yes. hono (npm): upgrade to 4.12.12 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-39408 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-39408?
Check whether you run hono (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • hono (npm): upgrade to 4.12.12 or later
    npm install hono@4.12.12

Technical details

A path traversal vulnerability exists in the toSSG() function of the Hono web framework. The root cause is insufficient sanitization of dynamic route parameters provided via ssgParams during the Static Site Generation (SSG) process. An attacker who can influence these parameters can use traversal sequences (e.g., '../') to escape the designated output directory. This allows for arbitrary file writes at build-time, potentially overwriting critical files or affecting downstream deployment tooling. The issue is fixed in version 4.12.12.

Affected products

  • honojs Hono >= 4.0.0, < 4.12.12

Identifiers

  • CVE-2026-39408
  • GHSA-xf4j-xp2r-rqqx

Timeline

  • 2026-04-07: patched: Fixed in version 4.12.12
  • 2026-04-08: disclosed: Initial advisory publication

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.