{"id":"GHSA-46wx-v44x-9hh2","kind":"vulnerability","aliases":["GHSA-46wx-v44x-9hh2"],"related":[],"title":"`csrf()` does not check requests sent by hyperlink auditing (`text/ping`)","description":"### Summary\r\n\r\n`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.\r\n\r\n### Details\r\n\r\nThe 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`.\r\n\r\nA 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.\r\n\r\nThe 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`.\r\n\r\n### Impact\r\n\r\nA 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.\r\n\r\nThis 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.\r\n\r\n### Workarounds\r\n\r\nReject requests with a `Content-Type` of `text/ping` in a middleware registered before `csrf()`, or set session cookies with `SameSite=Strict`.","summary":"The csrf() middleware in Hono only checks requests whose Content-Type is a form type, so Chromium hyperlink-auditing POSTs with text/ping skip the origin check. A malicious page visited by a logged-in user in Chrome or Edge can make the browser send a state-changing request to the application.","severity":"medium","cvss":5.3,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"hono","fixed":["4.13.16"],"affected":"< 4.13.16","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["bun","cloudflare-workers","cwe-352","deno","hono","node","package"],"not_affected_if":["firefox-only-users","no-csrf-middleware","no-state-changing-get-or-query-routes"],"how_to_check":"- Check the installed Hono version with `npm ls hono` and compare it to `4.13.16`.\n- Search the app for `csrf()` from `hono/csrf` and confirm whether it relies on it for CSRF protection.\n- Look for state-changing routes whose effect depends only on the path or query string.","fix":"- `hono` `4.13.16` and later (fixed version from the product data).","status":"open","published_at":"2026-11-01T02:38:44+00:00","first_seen_at":"2026-11-09T22:53:17+00:00","triaged_at":"2026-11-09T22:56:32+00:00","updated_at":"2026-11-09T22:56:32+00:00","category":"package","confidence":0.85,"triage":{"at":"2026-11-09T22:56:32Z","model":"claude-haiku-5-5","output":{"fix":"- `hono` `4.13.16` and later (fixed version from the product data).","reach":"internet","title":"Hono: csrf() middleware misses hyperlink-ping POSTs from Chromium browsers","impact":"medium","summary":"The csrf() middleware in Hono only checks requests whose Content-Type is a form type, so Chromium hyperlink-auditing POSTs with text/ping skip the origin check. A malicious page visited by a logged-in user in Chrome or Edge can make the browser send a state-changing request to the application.","audience":"developers","category":"package","nicknames":[],"who_cares":["hono","node","cloudflare-workers","deno","bun"],"confidence":0.85,"fix_status":"available","needs_auth":"no","worst_case":"Logged-in users have state-changing actions triggered by a malicious page","analyst_note":"Product: npm:hono affected < 4.13.16 fixed 4.13.16.","how_to_check":"- Check the installed Hono version with `npm ls hono` and compare it to `4.13.16`.\n- Search the app for `csrf()` from `hono/csrf` and confirm whether it relies on it for CSRF protection.\n- Look for state-changing routes whose effect depends only on the path or query string.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["no-csrf-middleware","no-state-changing-get-or-query-routes","firefox-only-users"],"who_is_affected":"Applications built with Hono that use the csrf() middleware as their CSRF protection and expose state-changing endpoints whose effect does not depend on the request body. Applications without csrf(), or whose state-changing routes need a body or a non-cookie credential, are less exposed. Browsers other than Chrome and Edge do not send these pings by default.","user_interaction":"yes","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.00084,"input_tokens":5153,"output_tokens":649,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-352':27B '46wx':13A,18A '9hh2':15A,20A 'action':269C 'affect':377C 'anoth':229C 'applic':86B,241C,338C,354C,378C 'assumpt':178C 'audit':9A,52B,112C,200C 'bodi':220C,264C,277C,401C 'browser':77B 'bun':22B 'cannot':191C 'chang':82B,251C,350C,391C 'check':4A,38B,59B,164C 'chrome':71B,204C,330C 'chromium':49B,109C 'cloudflar':24B 'cloudflare-work':23B 'content':42B,96C,126C,167C,183C,223C,408C 'content-typ':41B,95C,222C,407C 'cooki':123C,295C,316C,421C 'cor':187C 'credenti':198C,212C 'cross':116C,195C 'cross-origin':115C,194C 'csrf':1A,33B,88C,243C,291C,341C,382C,385C,417C 'cwe':26B 'default':287C,305C 'delet':359C 'deno':28B 'depend':274C,397C 'detail':158C 'edg':73B,206C,332C 'effect':271C,394C 'endpoint':392C 'evalu':258C 'except':203C 'expos':388C 'fetch':145C 'firefox':281C 'fix':219C,266C 'form':46B,106C,174C 'ghsa':12A,17A 'ghsa-46wx-v44x-9hh2':11A,16A 'handler':157C 'header':256C 'hono':21A,29B,36B 'html':105C 'hyperlink':8A,51B,111C,199C 'hyperlink-audit':50B 'impact':321C 'issu':376C 'lax':307C 'list':134C 'log':67B,334C,357C 'logged-in':66B 'look':139C 'made':344C 'make':75B 'malici':61B,327C 'mean':308C 'middlewar':34B,136C,160C,414C 'must':296C 'neither':255C 'node':30B 'none':320C 'one':99C,171C 'option':244C 'origin':58B,117C,141C,163C,196C,230C,246C,313C 'outcom':253C 'packag':31B 'page':62B,227C,328C 'pass':154C 'path':371C 'ping':209C,285C 'post':53B,118C,213C,235C 'preflight':188C,216C 'produc':176C 'protect':339C,386C 'queri':373C 'regist':415C 'reject':403C 'reli':380C 'request':5A,39B,83B,91C,150C,261C,263C,301C,351C,400C,404C 'requir':185C 'resourc':361C 'same-sit':310C 'samesit':306C,319C,423C 'sec':144C 'sec-fetch-sit':143C 'secfetchsit':248C 'select':368C 'send':78B,108C,113C,207C,284C,346C 'sent':6A,193C,298C 'session':420C 'set':317C,365C,419C 'site':146C,312C 'skip':56B,161C 'state':81B,349C,390C 'state-chang':80B,348C,389C 'strict':424C 'string':374C 'submiss':175C 'summari':87C 'text/ping':10A,55B,128C,225C,411C 'therefor':190C,232C 'three':102C 'toggl':363C 'trigger':233C,280C 'type':43B,47B,97C,103C,127C,168C,184C,224C,409C 'url':238C 'user':69B,121C,293C,323C 'v44x':14A,19A 'valid':89C 'visit':63B,325C 'whose':40B,270C,393C 'without':214C 'workaround':402C 'worker':25B","nicknames":[],"mitigations":[],"who_affected":"Applications built with Hono that use the csrf() middleware as their CSRF protection and expose state-changing endpoints whose effect does not depend on the request body. Applications without csrf(), or whose state-changing routes need a body or a non-cookie credential, are less exposed. Browsers other than Chrome and Edge do not send these pings by default.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["hono"],"ptokens":["hono"],"labels":["bun","cloudflareworkers","cwe352","deno","hono","medium","node","npm","package"],"campaign_type":null,"search_a":"'46wx':13A,18A '9hh2':15A,20A 'audit':9A 'check':4A 'csrf':1A 'ghsa':12A,17A 'ghsa-46wx-v44x-9hh2':11A,16A 'hono':21A 'hyperlink':8A 'request':5A 'sent':6A 'text/ping':10A 'v44x':14A,19A","search_b":"'-352':27B 'applic':86B 'audit':52B 'browser':77B 'bun':22B 'chang':82B 'check':38B,59B 'chrome':71B 'chromium':49B 'cloudflar':24B 'cloudflare-work':23B 'content':42B 'content-typ':41B 'csrf':33B 'cwe':26B 'deno':28B 'edg':73B 'form':46B 'hono':29B,36B 'hyperlink':51B 'hyperlink-audit':50B 'log':67B 'logged-in':66B 'make':75B 'malici':61B 'middlewar':34B 'node':30B 'origin':58B 'packag':31B 'page':62B 'post':53B 'request':39B,83B 'send':78B 'skip':56B 'state':81B 'state-chang':80B 'text/ping':55B 'type':43B,47B 'user':69B 'visit':63B 'whose':40B 'worker':25B","search_c":"'action':269C 'affect':377C 'anoth':229C 'applic':241C,338C,354C,378C 'assumpt':178C 'audit':112C,200C 'bodi':220C,264C,277C,401C 'cannot':191C 'chang':251C,350C,391C 'check':164C 'chrome':204C,330C 'chromium':109C 'content':96C,126C,167C,183C,223C,408C 'content-typ':95C,222C,407C 'cooki':123C,295C,316C,421C 'cor':187C 'credenti':198C,212C 'cross':116C,195C 'cross-origin':115C,194C 'csrf':88C,243C,291C,341C,382C,385C,417C 'default':287C,305C 'delet':359C 'depend':274C,397C 'detail':158C 'edg':206C,332C 'effect':271C,394C 'endpoint':392C 'evalu':258C 'except':203C 'expos':388C 'fetch':145C 'firefox':281C 'fix':219C,266C 'form':106C,174C 'handler':157C 'header':256C 'html':105C 'hyperlink':111C,199C 'impact':321C 'issu':376C 'lax':307C 'list':134C 'log':334C,357C 'look':139C 'made':344C 'malici':327C 'mean':308C 'middlewar':136C,160C,414C 'must':296C 'neither':255C 'none':320C 'one':99C,171C 'option':244C 'origin':117C,141C,163C,196C,230C,246C,313C 'outcom':253C 'page':227C,328C 'pass':154C 'path':371C 'ping':209C,285C 'post':118C,213C,235C 'preflight':188C,216C 'produc':176C 'protect':339C,386C 'queri':373C 'regist':415C 'reject':403C 'reli':380C 'request':91C,150C,261C,263C,301C,351C,400C,404C 'requir':185C 'resourc':361C 'same-sit':310C 'samesit':306C,319C,423C 'sec':144C 'sec-fetch-sit':143C 'secfetchsit':248C 'select':368C 'send':108C,113C,207C,284C,346C 'sent':193C,298C 'session':420C 'set':317C,365C,419C 'site':146C,312C 'skip':161C 'state':349C,390C 'state-chang':348C,389C 'strict':424C 'string':374C 'submiss':175C 'summari':87C 'text/ping':128C,225C,411C 'therefor':190C,232C 'three':102C 'toggl':363C 'trigger':233C,280C 'type':97C,103C,127C,168C,184C,224C,409C 'url':238C 'user':121C,293C,323C 'valid':89C 'visit':325C 'whose':270C,393C 'without':214C 'workaround':402C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-01T02:38:44+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"ghsa-repo","external_id":"GHSA-46wx-v44x-9hh2","url":"https://github.com/honojs/hono/security/advisories/GHSA-46wx-v44x-9hh2","severity":"medium","published_at":"2026-11-01T02:38:44+00:00","modified_at":"2026-11-01T18:09:59+00:00","first_seen_at":"2026-11-09T22:53:17+00:00","fetched_at":"2026-11-09T22:53:17+00:00","note":null}],"documents":[{"id":110463,"url":"https://github.com/honojs/hono/security/advisories/GHSA-46wx-v44x-9hh2","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa-repo","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}