GHSA-8j4g-w8fx-2239: Medium severity npm/hono vulnerability

Published Aug 3, 2026
·
Updated

Summary

The built-in CORS middleware (hono/cors) parses the attacker-controlled Access-Control-Request-Headers request header during a preflight (OPTIONS) request using a regular expression whose running time is quadratic in the input length. A single request carrying a long run of whitespace can consume seconds of CPU, and repeated requests can render the service unresponsive. This parsing runs under the default configuration.

Details

On a CORS preflight, when allowHeaders is not configured - the default - the middleware reflects and parses the Access-Control-Request-Headers value. The parser used a whitespace-tolerant regular expression whose backtracking makes the work grow quadratically (O(n²)) with the length of the value when it contains a long whitespace sequence without a delimiter.

Because the header value is bounded only by the deployment's maximum HTTP header size, a single preflight can block request processing for a noticeable amount of time; on runtimes that share one execution thread across requests, this stalls concurrent requests as well. No authentication, special origin, or user interaction is required.

This issue arises for any application using cors() with the default (or an empty) allowHeaders. Applications that set a non-empty allowHeaders do not reach the affected path.

Impact

An unauthenticated attacker can send preflight requests that each consume disproportionate CPU relative to their size, degrading or denying service. This is a denial-of-service issue only; it does not expose or modify data.

Affected Software

1 affected componentFixes available
npm/hono<4.12.34
4.12.34

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/hono to a version that resolves this vulnerability.

    Fixed in 4.12.34

Event History

Aug 3, 2026
Advisory Published
via GitHub·08:23 PM
Data Sourced
via GitHub·08:23 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-8j4g-w8fx-2239?

The severity of GHSA-8j4g-w8fx-2239 is rated as medium with a score of 5.3.

2

How do I fix GHSA-8j4g-w8fx-2239?

To fix GHSA-8j4g-w8fx-2239, update to the latest version of the Hono framework that includes the security patch.

3

What type of attacks does GHSA-8j4g-w8fx-2239 expose my application to?

GHSA-8j4g-w8fx-2239 exposes applications to denial-of-service attacks due to a vulnerable implementation of CORS middleware.

4

Which software is affected by GHSA-8j4g-w8fx-2239?

GHSA-8j4g-w8fx-2239 affects the npm package Hono.

5

When was GHSA-8j4g-w8fx-2239 published?

GHSA-8j4g-w8fx-2239 was published on August 3, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203