All vulnerabilities

npm

CVE-2026-71848

Hono: Algorithmic Complexity DoS in Language Middleware

Severity
Medium 5.3
Published
7 Aug 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
4.12.34
Exploit chance
0.5% in the next 30 daysHigher than 44% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Inefficient algorithmic complexity (CWE-407)
Attack
Over the network · No login needed · No user action needed
Attacker can
Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Also known as
GHSA-54fx-42gc-7vw4
Sources
OSV.dev and GitHub

Description

The languageDetector middleware is vulnerable to algorithmic complexity denial of service when processing a crafted language tag containing a large number of hyphen-separated subtags.

To implement progressive language-tag truncation, normalizeLanguage() repeatedly calls parts.slice(0, i).join('-') for every possible prefix. The total amount of string processing grows quadratically with the number of subtags.

Language values may come from a query parameter, cookie, Accept-Language header, or URL path, depending on the detector configuration. The default detector order enables query-string, cookie, and header detection, so applications using languageDetector() may expose this processing to unauthenticated requests.

Request-size limits reduce the maximum cost of a single request but do not eliminate the issue. Inputs accepted by common JavaScript runtimes can still cause noticeable synchronous event-loop blocking.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
hononpm · osv:npm:hono
  • From 4.12.0 before 4.12.34

About hono

Weekly downloads (npm)
108,805,821npm, 16 Nov 2026

References