Medium

Hono: `csrf()` does not check requests sent by hyperlink auditing (`text/ping`)

  • Disclosed: 12.11.2026
  • Updated: 13.11.2026 01:17

Summary

csrf() validates a request only when its Content-Type is one of the three types an HTML form can send. Chromium's hyperlink auditing (<a ping>) sends a cross-origin POST with the user's cookies and the content type text/ping, which is not in that list. The middleware does not look at Origin or Sec-Fetch-Site for such a request, so it is passed to the handler.

Details

The middleware skips the origin check when the content type is not one that a form submission produces. The assumption was that any other content type requires a CORS preflight and therefore cannot be sent cross-origin with credentials. Hyperlink auditing is an exception: Chrome and Edge send the ping as a credentialed POST without a preflight, with a fixed body and Content-Type: text/ping.

A page on another origin can therefore trigger a POST to any URL of the application. The csrf() options for origin and secFetchSite do not change the outcome, because neither header is evaluated for the request.

The request body is fixed, so only actions whose effect does not depend on the body can be triggered. Firefox does not send pings by default. As with any CSRF, the user's cookie must be sent with the request, which with the default SameSite=Lax means a same-site origin or a cookie set with SameSite=None.

Impact

A user who visits a malicious page in Chrome or Edge while logged in to an application protected by csrf() can be made to send a state-changing request to that application, such as logging out, deleting a resource, or toggling a setting that is selected by the path or query string.

This issue affects applications that rely on csrf() as their CSRF protection and expose state-changing endpoints whose effect does not depend on the request body.

Workarounds

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

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package hono < 4.13.16 4.13.16

References

CVSS score 5.3/10
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
Weakness (CWE)
CWE-352
Platform
npm
Package
hono
Disclosed
12.11.2026
Updated
13.11.2026 01:17

Sources and licenses

OSV / GitHub Advisory Database - GHSA-46wx-v44x-9hh2 - CC BY 4.0

Vulnerability history: hono

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (57) in the archive
Total entries
57
First → latest
12.2023 11.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 7
  • Medium 45
  • Low 5

Disclosures per year

  1. 2023: 1
  2. 2024: 3
  3. 2025: 4
  4. 2026: 49
Severity:
  1. Hono: `csrf()` does not check requests sent by hyperlink auditing (`text/ping`) this entry
    Medium · 5.3 CVE-2026-126355 < 4.13.16 4.13.16
  2. High · 8.1 CVE-2025-62610 >= 1.1.0, < 4.10.2 4.10.2
  3. High · 7.5 CVE-2025-58362 >= 4.8.0, < 4.9.6 4.9.6

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.