ClaudeHonoMar 3, 2026, 10:27 AM

v4.12.4

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

claudeenmodel: claude-sonnet-4-20250514

Hono v4.12.4 - Critical Security Fixes

Key Points

  • Three critical security vulnerabilities fixed
  • SSE and cookie injection attacks prevented
  • Serve static middleware bypass resolved

Summary

Hono v4.12.4 addresses three critical security vulnerabilities affecting core components. This is a security-focused release with essential fixes for injection attacks and middleware bypass issues.

Key Security Fixes

  • SSE Control Field Injection (GHSA-p6xx-57qc-3wxr): Fixed injection vulnerabilities in streamSSE() by rejecting CR/LF characters in event, id, and retry fields
  • Cookie Attribute Injection (GHSA-5pq2-9x2x-5p6w): Resolved cookie manipulation in setCookie() by rejecting ;, \r, and \n characters in domain and path options
  • Middleware Bypass in Serve Static (GHSA-q5qw-h33p-qvwr): Fixed inconsistent URL decoding that could allow unauthorized access to protected static resources

Other Changes

  • Fixed route schema preservation in ApplyGlobalResponse for client
  • Improved return type specification for tryDecodeURI utility

⚠️ Users utilizing Streaming Helper, Cookie utility, or Serve Static middleware should upgrade immediately.

Full Translation

Translations

A translation section that keeps the flow of the original article.

claudejamodel: claude-sonnet-4-20250514

v4.12.4

セキュリティ修正

このリリースには、以下のセキュリティ問題の修正が含まれています:

SSE Control Field Injection

  • 影響範囲: Streaming HelperのstreamSSE()
  • 修正内容: eventidretryでCR/LF文字を拒否することで、意図しないSSEフィールドのインジェクションを修正
  • GHSA: GHSA-p6xx-57qc-3wxr

setCookie()でのCookie Attribute Injection

  • 影響範囲: hono/cookieのsetCookie()
  • 修正内容: domainとpathオプションで;\r\nを拒否することで、cookie属性の操作を修正
  • GHSA: GHSA-5pq2-9x2x-5p6w

Serve StaticでのMiddleware Bypass

  • 影響範囲: Serve Staticミドルウェア
  • 修正内容: 保護された静的リソースがルートベースのミドルウェアをトリガーせずにアクセスされる可能性があった、一貫性のないURLデコーディングを修正
  • GHSA: GHSA-q5qw-h33p-qvwr

Streaming Helper、Cookieユーティリティ、Serve Staticを使用しているユーザーは、このバージョンへのアップグレードを強く推奨します。

その他の変更

  • fix(client): ApplyGlobalResponseでルートスキーマを保持 by @agumy in #4777
  • fix(utils/url): tryDecodeURIの戻り値の型を指定 by @yusukebe in #4779

新しいコントリビューター

  • @agumyが#4777で初回コントリビューション

Full Changelog: v4.12.3...v4.12.4