{"id":"CVE-2026-39408","published":"2026-04-08T14:42:25Z","modified":"2026-04-10T20:31:47Z","title":"Hono has a path traversal in toSSG() allows writing files outside the output directory","vendor":"honojs","product":"hono","tier":"tail","description":{"text":"Hono is a Web application framework that provides support for any JavaScript runtime. Prior to 4.12.12, 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. This vulnerability is fixed in 4.12.12.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00513,"percentile":0.44608,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/honojs/hono/security/advisories/GHSA-xf4j-xp2r-rqqx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/honojs/hono/commit/b470278920fffcfd6d76002755d6db53db827679","tags":["x_refsource_MISC"]},{"url":"https://github.com/honojs/hono/releases/tag/v4.12.12","tags":["x_refsource_MISC"]}],"priority":{"score":13.1,"factors":[{"name":"EPSS percentile","points":8.92},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"honojs","affectedVersions":[{"vendor":"honojs","product":"hono","versions":["< 4.12.12"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-04-10T20:31:12.971142Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"hono","vulnerableRanges":[">=4.0.0, <4.12.12"],"patched":["4.12.12"],"from":["GHSA-xf4j-xp2r-rqqx"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-20495","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-honojs-hono-cve-2026-39408","children":[{"from":"CVE-2026-39408","to":"CVE-2026-84365","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"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…","from":"CVE.org","in":"CVE-2026-84365"},{"kind":"same-code","provenance":"machine","files":["src/helper/ssg/ssg.ts","src/helper/ssg/utils.ts"],"commits":["https://github.com/honojs/hono/commit/b470278920fffcfd6d76002755d6db53db827679","https://github.com/honojs/hono/commit/3a67f7f3997e1437d108f7bcba2dbcee2df69221"],"basis":"rarely changed file"},{"kind":"similar","provenance":"machine","score":0.53,"basis":"same product + CWE + description similarity"}]}]}}