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

Source: https://junglewise.ai/threats/cve-2026-39408-hono-path-traversal-in-tossg-during-static-site-generation  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-08. Updated: 2026-07-24  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/hono). Vendors: [npm](https://junglewise.ai/threats/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

  ```sh
  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

- [https://github.com/honojs/hono/commit/b470278920fffcfd6d76002755d6db53db827679](https://github.com/honojs/hono/commit/b470278920fffcfd6d76002755d6db53db827679)
- [https://github.com/honojs/hono/releases/tag/v4.12.12](https://github.com/honojs/hono/releases/tag/v4.12.12)
- [https://github.com/honojs/hono/security/advisories/GHSA-xf4j-xp2r-rqqx](https://github.com/honojs/hono/security/advisories/GHSA-xf4j-xp2r-rqqx)

## Related threats

- [Hono: `css` helper does not escape a closing tag split between the template and an interpolated value, allowing HTML injection](https://junglewise.ai/threats/cve-2026-126359-hono-css-helper-does-not-escape-a-closing-tag-split-between-the)
- [Hono RegExpRouter middleware bypass via wildcard matching](https://junglewise.ai/threats/cve-2026-126358-hono-regexprouter-skips-wildcard-middleware-for-some-route-sets)
- [Hono mount() path traversal bypasses middleware scoping](https://junglewise.ai/threats/cve-2026-126357-hono-mount-and-app-mount-can-forward-a-path-that-bypasses)
- [Hono validator form multipart/form-data parameter bypass](https://junglewise.ai/threats/cve-2026-126356-hono-validator-form-skips-validation-for-multipart-form-data)
- [Hono csrf() middleware bypass via hyperlink auditing](https://junglewise.ai/threats/cve-2026-126355-hono-csrf-does-not-check-requests-sent-by-hyperlink-auditing)
