Cross-site Request Forgery (CSRF) Affecting hono package, versions <4.13.16


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.18% (8th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-site Request Forgery (CSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-HONO-22549649
  • published14 Nov 2026
  • disclosed12 Nov 2026
  • creditAli AlMousa

Introduced: 12 Nov 2026

NewCVE-2026-126355  (opens in a new tab)
CWE-352  (opens in a new tab)

How to fix?

Upgrade hono to version 4.13.16 or higher.

Overview

hono is an Ultrafast web framework for the Edges

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) via the csrf() middleware's failure to validate requests with Content-Type: text/ping. The middleware only performs origin checks when the content type matches one of the three types an HTML form can send. Chromium's hyperlink auditing (<a ping>) sends a credentialed cross-origin POST with Content-Type: text/ping and no CORS preflight, which the middleware passes directly to the handler without evaluating the Origin or Sec-Fetch-Site headers. An attacker can therefore host a page that causes a visiting user in Chrome or Edge to trigger state-changing POST requests - such as logging out, deleting a resource, or toggling a setting - against any application protected by csrf(), provided the request body content is irrelevant to the action.

Note: This is only exploitable against endpoints whose effect does not depend on the request body, and requires the user's session cookie to be sent with the request (default SameSite=Lax permits this from a same-site origin, or when cookies are set with SameSite=None).

Workaround

Reject requests with a Content-Type of text/ping in a middleware registered before csrf(), or set session cookies with SameSite=Strict.

CVSS Base Scores

version 4.0
version 3.1