Vulnerability · Published Aug 22, 2024 · Assigned by GitHub_M

CVE-2024-43787Hono CSRF middleware can be bypassed using crafted Content-Type header

Medium 5.0

In plain English

A medium-severity cross-site request forgery in hono from honojs. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.0Medium
Exploit odds (30 days)0.2%top 84.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmhono4.5.8GHSA-rpfr-3m35-5vx5

Affected products (as reported)

VendorProductVersions
honojs hono < 4.5.8

Weakness: CWE-352 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

References