chore(deps): update dependency hono to v4.12.7 [security]#70
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dependency hono to v4.12.7 [security]#70renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
da4c05e to
91f753d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.11.10→4.12.7GitHub Vulnerability Alerts
CVE-2026-29085
Summary
When using
streamSSE()in Streaming Helper, theevent,id, andretryfields were not validated for carriage return (\r) or newline (\n) characters.Because the SSE protocol uses line breaks as field delimiters, this could allow injection of additional SSE fields within the same event frame if untrusted input was passed into these fields.
Details
The SSE helper builds event frames by joining lines with
\n. While multi-linedata:fields are handled according to the SSE specification, theevent,id, andretryfields previously allowed raw values without rejecting embedded CR/LF characters.Including CR/LF in these control fields could allow unintended additional fields (such as
data:,id:, orretry:) to be injected into the event stream.The issue has been fixed by rejecting CR/LF characters in these fields.
Impact
An attacker could manipulate the structure of SSE event frames if an application passed user-controlled input directly into
event,id, orretry.Depending on application behavior, this could result in injected SSE fields or altered event stream handling. Applications that render
e.datain an unsafe manner (for example, usinginnerHTML) could potentially expose themselves to client-side script injection.This issue affects applications that rely on the SSE helper to enforce protocol-level constraints.
CVE-2026-29045
Summary
When using
serveStatictogether with route-based middleware protections (e.g.app.use('/admin/*', ...)), inconsistent URL decoding allowed protected static resources to be accessed without authorization.The router used
decodeURI, whileserveStaticuseddecodeURIComponent. This mismatch allowed paths containing encoded slashes (%2F) to bypass middleware protections while still resolving to the intended filesystem path.Details
The routing layer preserved
%2Fas a literal string, whileserveStaticdecoded it into/before resolving the file path.Example:
Request:
/admin%2Fsecret.html/admin%2Fsecret.html→ does not match/admin/*/admin/secret.htmlAs a result, static files under the configured static root could be served without triggering route-based protections.
This only affects applications that both:
serveStatic.This does not allow access outside the static root and is not a path traversal vulnerability.
Impact
An unauthenticated attacker could bypass route-based authorization for protected static resources by supplying paths containing encoded slashes.
Applications relying solely on route-based middleware to protect static subpaths may have exposed those resources.
CVE-2026-29086
Summary
The
setCookie()utility did not validate semicolons (;), carriage returns (\r), or newline characters (\n) in thedomainandpathoptions when constructing theSet-Cookieheader.Because cookie attributes are delimited by semicolons, this could allow injection of additional cookie attributes if untrusted input was passed into these fields.
Details
setCookie()builds theSet-Cookieheader by concatenating option values. While the cookie value itself is URL-encoded, thedomainandpathoptions were previously interpolated without rejecting unsafe characters.Including
;,\r, or\nin these fields could result in unintended additional attributes (such asSameSite,Secure,Domain, orPath) being appended to the cookie header.Modern runtimes prevent full header injection via CRLF, so this issue is limited to attribute-level manipulation within a single
Set-Cookieheader.The issue has been fixed by rejecting these characters in the
domainandpathoptions.Impact
An attacker may be able to manipulate cookie attributes if an application passes user-controlled input directly into the
domainorpathoptions ofsetCookie().This could affect cookie scoping or security attributes depending on browser behavior. Exploitation requires application-level misuse of cookie options.
GHSA-v8w9-8mx6-g223
Summary
When using
parseBody({ dot: true })in HonoRequest, specially crafted form field names such as__proto__.xcould create objects containing a__proto__property.If the parsed result is later merged into regular JavaScript objects using unsafe merge patterns, this may lead to prototype pollution in the target object.
Details
The
parseBody({ dot: true })feature supports dot notation to construct nested objects from form field names.In previous versions, the
__proto__path segment was not filtered. As a result, specially crafted keys such as__proto__.xcould produce objects containing__proto__properties.While this behavior does not directly modify
Object.prototypewithin Hono itself, it may become exploitable if the parsed result is later merged into regular JavaScript objects using unsafe merge patterns.Impact
Applications that merge parsed form data into regular objects using unsafe patterns (for example recursive deep merge utilities) may become vulnerable to prototype pollution.
Release Notes
honojs/hono (hono)
v4.12.7Compare Source
v4.12.6Compare Source
v4.12.5Compare Source
What's Changed
string | undefinedfrom param() when path type is any by @andrewdamelio in #4723@hono/eslint-configby @BarryThePenguin in #4781New Contributors
Full Changelog: honojs/hono@v4.12.4...v4.12.5
v4.12.4Compare Source
Security fixes
This release includes fixes for the following security issues:
SSE Control Field Injection
Affects:
streamSSE()in Streaming Helper. Fixes injection of unintended SSE fields by rejecting CR/LF characters inevent,id, andretry. GHSA-p6xx-57qc-3wxrCookie Attribute Injection in
setCookie()Affects:
setCookie()fromhono/cookie. Fixes cookie attribute manipulation by rejecting;,\r, and\nindomainandpathoptions. GHSA-5pq2-9x2x-5p6wMiddleware Bypass in Serve Static
Affects: Serve Static middleware. Fixes inconsistent URL decoding that could allow protected static resources to be accessed without triggering route-based middleware. GHSA-q5qw-h33p-qvwr
Users who uses Strreaming Helper, Cookie utility, and Serve Static are strongly encouraged to upgrade to this version.
Other changes
tryDecodeURIby @yusukebe in #4779New Contributors
Full Changelog: honojs/hono@v4.12.3...v4.12.4
v4.12.3Compare Source
What's Changed
Math.floorinstead of bitwise OR for safe timestamp by @EdamAme-x in #4754JwtVariablesforContextVariableMapby @yusukebe in #4764New Contributors
Full Changelog: honojs/hono@v4.12.2...v4.12.3
v4.12.2Compare Source
Security fix
Fixed incorrect handling of
X-Forwarded-Forin the AWS Lambda adapter behind ALB that could allow IP-based access control bypass. The detail: GHSA-xh87-mx6m-69f3Thanks @EdamAme-x
What's Changed
Full Changelog: honojs/hono@v4.12.1...v4.12.2
v4.12.1Compare Source
What's Changed
ApplyGlobalResponsefromhono/clientby @sushichan044 in #4743Full Changelog: honojs/hono@v4.12.0...v4.12.1
v4.12.0Compare Source
Release Notes
Hono v4.12.0 is now available!
This release includes new features for the Hono client, middleware improvements, adapter enhancements, and significant performance improvements to the router and context.
$pathfor Hono ClientThe Hono client now has a
$path()method that returns the path string instead of a full URL. This is useful when you need just the path portion for routing or key-based operations:Unlike
$url()which returns aURLobject,$path()returns a plain path string, making it convenient for use with routers or as cache keys.Thanks @ShaMan123!
ApplyGlobalResponseType Helper for RPC ClientThe new
ApplyGlobalResponsetype helper allows you to add global error response types to all routes in the RPC client. This is useful for typing common error responses fromapp.onError()or global middlewares:Thanks @mohankumarelec!
SSG Redirect Plugin
A new
redirectPluginfor SSG generates static HTML redirect pages for HTTP redirect responses (301, 302, 303, 307, 308):The generated redirect pages include a
<meta http-equiv="refresh">tag, a canonical link, and arobots noindexmeta tag.Thanks @3w36zj6!
onAuthSuccessCallback for Basic AuthThe Basic Auth middleware now supports an
onAuthSuccesscallback that is invoked after successful authentication. This allows you to set context variables or perform logging without re-parsing the Authorization header:The callback also works with async functions and the
verifyUsermode.Thanks @AprilNEA!
getConnInfofor AWS Lambda, Cloudflare Pages, and NetlifygetConnInfo()is now available for three additional adapters:Thanks @rokasta12!
alwaysRedirectOption for Trailing Slash MiddlewareThe trailing slash middleware now supports an
alwaysRedirectoption. When enabled, the middleware redirects before executing handlers, which fixes the issue where trailing slash handling doesn't work with wildcard routes:Progressive Locale Code Truncation
The
normalizeLanguagefunction in the language middleware now supports RFC 4647 Lookup-based progressive truncation. Locale codes likeja-JPwill matchjawhen only the base language is insupportedLanguages:Thanks @sorafujitani!
exportsField forExecutionContextThe
ExecutionContexttype now includes anexportsproperty for Cloudflare Workers. You can use module augmentation to type it with Wrangler's generated types:Thanks @toreis-up!
Performance Improvements
TrieRouter 1.5x ~ 2.0x Faster
The TrieRouter has been significantly optimized with reduced spread syntax usage, O(1)
hasChildrenchecks, lazy regular expression generation, and removal of redundant processes:GET /userGET /user/lookup/username/heyGET /static/index.htmlThanks @EdamAme-x!
Fast Path for
c.json()c.json()now has the same fast path optimization asc.text(). When no custom status, headers, or finalized state exists, the Response is created directly without allocating aHeadersobject:Benchmark results:
Thanks @mgcrea!
New features
ApplyGlobalResponsetype helper for RPC Client #4556alwaysRedirectoption to support wildcard routes #4658Performance
createResponseInstancefor new Response #4733All changes
ApplyGlobalResponsetype helper for RPC Client by @mohankumarelec in #4556alwaysRedirectoption to support wildcard routes by @yusukebe in #4658createResponseInstancefor new Response by @yusukebe in #4733New Contributors
Full Changelog: honojs/hono@v4.11.10...v4.12.0
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.