Update dependency hono to v4.5.8 [SECURITY] #607
Merged
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.5.3
->4.5.8
GitHub Vulnerability Alerts
CVE-2024-43787
Summary
Hono CSRF middleware can be bypassed using crafted Content-Type header.
Details
MIME types are case insensitive, but
isRequestedByFormElementRe
only matches lower-case.https://github.com/honojs/hono/blob/b0af71fbcc6dbe44140ea76f16d68dfdb32a99a0/src/middleware/csrf/index.ts#L16-L17
As a result, attacker can bypass csrf middleware using upper-case form-like MIME type, such as "Application/x-www-form-urlencoded".
PoC
Impact
Bypass csrf protection implemented with hono csrf middleware.
Discussion
I'm not sure that omitting csrf checks for Simple POST request is a good idea.
CSRF prevention and CORS are different concepts even though CORS can prevent CSRF in some cases.
Release Notes
honojs/hono (hono)
v4.5.8
Compare Source
Security Fix for CSRF Protection Middleware
Before this release, in versions 4.5.7 and below, the CSRF Protection Middleware did not treat requests including
Content-Types
with uppercase letters (e.g.,Application/x-www-form-urlencoded
) as potential attacks, allowing them to pass.This could cause unexpected behavior, leading to a vulnerability. If you are using the CSRF Protection Middleware, please upgrade to version 4.5.8 or higher immediately.
For more details, see the report here: GHSA-rpfr-3m35-5vx5
v4.5.7
Compare Source
What's Changed
target
andformtarget
attribute types by @ssssota in https://github.com/honojs/hono/pull/3299New Contributors
Full Changelog: honojs/hono@v4.5.6...v4.5.7
v4.5.6
Compare Source
What's Changed
New Contributors
Full Changelog: honojs/hono@v4.5.5...v4.5.6
v4.5.5
Compare Source
What's Changed
c.header
by @nakasyou in https://github.com/honojs/hono/pull/3221c.header
by @nakasyou in https://github.com/honojs/hono/pull/3255.
and not end/
by @yusukebe in https://github.com/honojs/hono/pull/3256Full Changelog: honojs/hono@v4.5.4...v4.5.5
v4.5.4
Compare Source
What's Changed
param
inValidationTargets
supports optional param by @yusukebe in https://github.com/honojs/hono/pull/3229New Contributors
Full Changelog: honojs/hono@v4.5.3...v4.5.4
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, 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.