Skip to main content

CVE-2026-39408

| EUVDEUVD-2026-20495 MEDIUM
Path Traversal (CWE-22)
2026-04-08 https://github.com/honojs/hono GHSA-xf4j-xp2r-rqqx
5.9
CVSS 4.0 · Vendor: https://github.com/honojs/hono
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Impact

This vulnerability presents a moderate real-world risk despite the absence of a CVSS score and EPSS data. The attack vector is local/build-time rather than remote, limiting immediate exposure in production environments. However, the impact is significant in development and CI/CD pipelines where an attacker with influence over build parameters (e.g., through compromised configuration, dependency injection, or supply chain attack) can corrupt or overwrite arbitrary files on the build system. The lack of authentication requirements (this is a build-process issue, not a runtime authentication question) and the simplicity of exploitation (path traversal via ../ is trivial to craft) increase practical risk. The confirmation of a vendor-released patch (v4.12.12) and the availability of a specific commit fix (b470278920fffcfd6d76002755d6db53db827679) indicate the vendor took this seriously. No KEV status or public POC was identified in the input data, suggesting limited active exploitation at time of analysis, but organizations using Hono for SSG should prioritize patching to prevent supply chain or build-artifact tampering.

Exploit ScenarioDerived

A developer uses Hono's SSG functionality with dynamic route parameters sourced from an external configuration file or environment variable. An attacker compromises or manipulates this configuration to inject a traversal sequence (e.g., setting an id parameter to ../../../etc/passwd or ../artifact.txt) into ssgParams. When toSSG() executes during the build process, it constructs an output path that escapes the intended ./static directory and writes files to arbitrary locations on the build system, potentially overwriting critical build artifacts, configuration files, or deployment outputs. No special privileges or runtime interaction is required; the attack succeeds entirely within the build pipeline if the attacker can influence input parameters.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 08, 2026

Path traversal in Hono's toSSG() function allows attackers to write files outside the configured output directory during static site generation by injecting traversal sequences into ssgParams dynamic route values. The vulnerability is limited to build-time operations and does not affect runtime request handling. A vendor-released patch is available in Hono v4.12.12.

RemediationAI

Vendor-released patch: upgrade Hono to v4.12.12 or later, which resolves the path traversal issue in toSSG(). Update package.json to reference hono@^4.12.12 and run npm install (or equivalent for yarn/pnpm). The upstream fix is available in commit b470278920fffcfd6d76002755d6db53db827679 (https://github.com/honojs/hono/commit/b470278920fffcfd6d76002755d6db53db827679). Users unable to upgrade immediately should avoid passing untrusted or user-controlled values to ssgParams and validate/sanitize any dynamic parameters before SSG execution. Review build process and CI/CD configuration to ensure ssgParams values originate from trusted sources only.

Affected VersionsENISA

hono < 4.12.12

Affected Packages

npm hono fix: 4.12.12

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Hono is a lightweight web framework for JavaScript/TypeScript that includes static site generation (SSG) capabilities via the toSSG() function. The vulnerability exists in how ssgParams processes dynamic route parameters to construct output file paths. When user-controlled or attacker-influenced values are passed to ssgParams for dynamic routes (e.g., /:id), the framework fails to sanitize path traversal sequences like ../ before constructing the final output path. This violates CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) by allowing relative path manipulation to escape the intended output directory boundary. The affected product is the npm package 'hono' (pkg:npm/hono), which is widely used for building web applications and static sites in the Node.js/JavaScript ecosystem.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/honojs/hono) PRIMARY 5.9 MEDIUM
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/honojs/hono) · only source for this CVE.

CVSS VectorVendor: https://github.com/honojs/hono

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch released
Apr 08, 2026 - 00:30 nvd
Patch available
CVE Published
Apr 08, 2026 - 00:16 nvd
MEDIUM 5.9

DescriptionCVE.org

Summary

A path traversal issue in toSSG() allows files to be written outside the configured output directory during static site generation. When using dynamic route parameters via ssgParams, specially crafted values can cause generated file paths to escape the intended output directory.

Details

The static site generation process creates output files based on route paths derived from application routes and parameters. When ssgParams is used to provide values for dynamic routes, those values are used to construct output file paths. If these values contain traversal sequences (e.g. ..), the resulting output path may resolve outside the configured output directory. As a result, files may be written to unintended locations instead of being confined within the specified output directory.

For example:

ts
import { Hono } from 'hono'
import { toSSG, ssgParams } from 'hono/ssg'

const app = new Hono()

app.get('/:id', ssgParams([{ id: '../pwned' }]), (c) => {
  return c.text('pwned')
})

toSSG(app, fs, { dir: './static' })

In this case, the generated output path may resolve outside ./static, resulting in a file being written outside the intended output directory.

Impact

An attacker who can influence values passed to ssgParams during the build process may be able to write files outside the intended output directory.

Depending on the build and deployment environment, this may:

  • overwrite unintended files
  • affect generated artifacts
  • impact deployment outputs or downstream tooling

This issue is limited to build-time static site generation and does not affect request-time routing.

Threat Intelligence Overview

EPSS Score
0.0%
Top 96% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy