CVE-2026-24398: Hono Package IP Address Validation Bypass Vulnerability
Summary
CVE-2026-24398: Hono IPv4 address validation bypass in IP Restriction Middleware allows IP spoofing. Affects hono versions < 4.11.7. Fixed in 4.11.7. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Hono is an open-source framework designed for building cloud-native applications. It provides various middleware components, including IP Restriction Middleware, which is intended to enforce access control based on client IP addresses. However, a flaw in the IP address validation process exposes the application to potential IP spoofing attacks, undermining the security of the access control mechanisms.
Vulnerability Detail
The vulnerability in Hono's IP Restriction Middleware arises from an improper validation of IPv4 addresses. The regex pattern used for validation allows octet values to exceed the valid range of 0-255, enabling attackers to craft malformed IP addresses that can bypass IP-based access controls. Specifically, the IPV4_REGEX pattern accepts values like '999', and the convertIPv4ToBinary function does not check octet ranges before performing bitwise operations. This can lead to unauthorized access, as attackers can exploit this flaw to bypass blocklists and allowlists by using crafted IP addresses.
How To Fix
Latest published version: 4.13.13 as of 23 Oct 2026
npm install hono@4.13.13
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
4.11.7
This is the first release that contains the fix.
npm install hono@4.11.7
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can implement additional validation checks in your application to ensure that all octets of the IP address are within the range of 0-255 before processing them. For example, you can use the following code snippet to validate the IP address:
function isValidIPv4(ip) {
const octets = ip.split('.');
if (octets.length !== 4) return false;
return octets.every(octet => {
const num = parseInt(octet, 10);
return num >= 0 && num <= 255;
});
}
Conclusion
The IP address validation bypass vulnerability in Hono's IP Restriction Middleware poses a significant risk to applications relying on IP-based access controls. By updating to the patched version and implementing additional validation checks, developers can mitigate the risks associated with this vulnerability.
See every vulnerability recorded for hono →
FAQ
CVE-2026-24398 is a vulnerability in the Hono package that allows attackers to bypass IP address validation, potentially leading to unauthorized access.
If your application relies on IP-based access controls, this vulnerability could allow unauthorized users to gain access by using crafted IP addresses.
You should update the Hono package to version 4.11.7 or later to ensure that the vulnerability is patched.
Yes, you can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
The CVSS score of this vulnerability is 4.8, indicating a moderate level of severity.
References
Related vulnerabilities
Recent vulnerabilities recorded for hono.