REDHAT-BUG-2572855: CSRF
Hono is a Web application framework that provides support for any JavaScript runtime. Prior to 4.13.16, csrf() limits origin validation to the content types normally sent by HTML forms and therefore does not validate text/ping requests generated by Chromium hyperlink auditing. Chrome and Edge can send a cross-origin credentialed POST without a CORS preflight through an <a ping> action, and the middleware then skips both Origin and Sec-Fetch-Site checks. The fixed request body limits exploitation to state-changing endpoints whose effect is selected by the path or query string and does not depend on submitted body data. The user's cookie must accompany the request, which generally requires a same-site origin or a cookie configured with SameSite=None, and Firefox does not send hyperlink-auditing pings by default. This issue is fixed in version 4.13.16.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Honoto a version that resolves this vulnerability.Fixed in 4.13.16
Event History
Frequently Asked Questions
Which applications are realistically exposed?
Applications using Hono csrf() before 4.13.16 are exposed only where a state-changing POST endpoint selects its action from the path or query string rather than requiring submitted request-body data. The victim’s authentication cookie must also be sent with the request.
What does an attacker need to exploit this?
An attacker needs a Chromium-based browser that sends hyperlink-auditing pings, such as Chrome or Edge, and must trigger a cross-origin credentialed POST through an <a ping> action. The victim’s cookie generally must be available from a same-site origin or be configured with SameSite=None.
Are Firefox users affected in the same way?
Firefox does not send hyperlink-auditing pings by default, so this attack path does not apply by default in Firefox.
How can I determine whether the issue is fixed?
Hono version 4.13.16 contains the fix. Versions prior to 4.13.16 are affected when csrf() is used under the described endpoint and cookie conditions.