CVE-2026-84365

Hono: Incomplete fix for CVE-2026-39408: `toSSG()` still writes files outside the output directory

Published Sep 1, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
Description
Hono is a Web application framework that provides support for any JavaScript runtime. From 4.12.12 until 4.13.5, the fix released for CVE-2026-39408 does not cover every traversal sequence, and toSSG() can still write files outside the configured output directory when a route parameter contains consecutive parent-directory segments. Static site generation builds each output path from the route path and values supplied through ssgParams, then verifies that the result stays inside the output directory using the same normalization routine that built the path. That routine does not fully collapse runs of consecutive parent-directory segments, allowing a path that the check accepts to resolve outside the output directory, and the check also treats output directories that differ in how they are rooted as equivalent. This arises when an application generates a static site from route parameter values it does not fully control, such as slugs from a CMS, API, or user submission. An untrusted ssgParams value can create or overwrite files elsewhere in the build environment and alter generated artifacts or deployment output. The vulnerability affects build-time static site generation only; request-time routing and applications with entirely developer-controlled ssgParams values are not affected. This issue is fixed in version 4.13.5.

Analysis

AI-generated

Technical impact

Hono’s static site generation function toSSG() incorrectly normalizes paths that contain consecutive parent-directory segments, allowing attacker-controlled route parameters to create file paths that resolve outside the configured output directory. An exploit permits the attacker to create or overwrite arbitrary files in the build environment, which can corrupt deployment outputs or inject malicious code into the generated site. The flaw does not affect request-time routing or fully developer-controlled parameters, but it can be leveraged during build time when the application consumes untrusted slugs from a CMS, API, or user submission.

Affected Systems

Hono framework versions from 4.12.12 through 4.13.4 are vulnerable. The issue is addressed in version 4.13.5 and later, so any deployment using these earlier releases is at risk.

Risk and Exploitability

The CVSS score of 6.5 indicates a moderate severity vulnerability with potential integrity impact. No EPSS score is available, and it is not listed in CISA’s KEV catalog, suggesting limited known exploitation activity. The most likely attack vector is build-time static site generation by a deployment pipeline that incorporates untrusted user data into route parameters. While the vulnerability cannot be triggered through normal request handling, an attacker who can influence the build process can exploit it to tamper with site artifacts.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Hono framework to version 4.13.5 or newer, which contains the fix for this path traversal issue.
  • If an upgrade is not immediately possible, validate or sanitize all ssgParams values used in static site generation to reject or escape any parent-directory sequences such as ".." before they are passed to toSSG().
  • After sanitization, run a post-build integrity check that confirms all written files reside within the intended output directory, and consider restricting the build environment’s file system permissions to minimize the impact of any accidental writes beyond the expected location.

Generated by OpenCVE AI on September 2, 2026 at 02:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-gqvv-2mrq-wpjv Hono: Incomplete fix for CVE-2026-39408: `toSSG()` still writes files outside the output directory
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Hono
Hono hono
Vendors & Products Hono
Hono hono
Type Values Removed Values Added
Description Hono is a Web application framework that provides support for any JavaScript runtime. From 4.12.12 until 4.13.5, the fix released for CVE-2026-39408 does not cover every traversal sequence, and toSSG() can still write files outside the configured output directory when a route parameter contains consecutive parent-directory segments. Static site generation builds each output path from the route path and values supplied through ssgParams, then verifies that the result stays inside the output directory using the same normalization routine that built the path. That routine does not fully collapse runs of consecutive parent-directory segments, allowing a path that the check accepts to resolve outside the output directory, and the check also treats output directories that differ in how they are rooted as equivalent. This arises when an application generates a static site from route parameter values it does not fully control, such as slugs from a CMS, API, or user submission. An untrusted ssgParams value can create or overwrite files elsewhere in the build environment and alter generated artifacts or deployment output. The vulnerability affects build-time static site generation only; request-time routing and applications with entirely developer-controlled ssgParams values are not affected. This issue is fixed in version 4.13.5.
Title Hono: Incomplete fix for CVE-2026-39408: `toSSG()` still writes files outside the output directory
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 4, 2026, 2:09 AM
Reserved
Sep 1, 2026, 4:27 PM
Status
Deferred
Published
Sep 1, 2026, 9:18 PM
Modified
Sep 9, 2026, 9:09 PM