CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-71848

CVE-2026-71848: Algorithmic Complexity Denial of Service in Hono languageDetector Middleware

Alon Barad
Alon Barad
Software Engineer

Aug 8, 2026·5 min read·43 visits

Executive Summary (TL;DR)

Unauthenticated remote attackers can cause complete Denial of Service (DoS) in Hono applications running versions 4.12.0 to 4.12.33 by sending excessively long hyphen-separated language strings in headers, cookies, or query parameters.

An Algorithmic Complexity Denial of Service (DoS) vulnerability exists in the Hono web application framework within its languageDetector middleware. From version 4.12.0 to 4.12.33, the progressive language-tag truncation routine (normalizeLanguage) performs string operations with a quadratic time complexity O(N^2) relative to the number of hyphen-separated subtags in the user-supplied language tag. This allows an unauthenticated remote attacker to cause resource exhaustion and CPU spikes, resulting in a full denial of service of the single-threaded JavaScript runtime.

Vulnerability Overview

The Hono web application framework provides a languageDetector middleware designed to parse language tags and match client preferences against a developer-defined array of supported languages. This functionality is crucial for internationalization, allowing applications to dynamically serve content customized to the locale of the user.

Within Hono versions 4.12.0 through 4.12.33, the language detection routine implements a progressive truncation mechanism to resolve language matches. This routine exposes an attack surface where an unauthenticated remote attacker can supply a crafted language tag to trigger high resource consumption.

The underlying vulnerability is classified as an Algorithmic Complexity Denial of Service (CWE-407). It occurs when the progressive truncation routine processes incoming language tags containing an excessively large number of hyphen-separated subtags, leading to extreme CPU utilization and blocking behavior.

Root Cause Analysis

The root cause of this vulnerability lies in the implementation of the language-tag progressive truncation algorithm in src/middleware/language/language.ts. When a client requests a specific locale, such as en-US-POSIX, the middleware evaluates candidate prefixes by iteratively stripping the right-most subtag to match against developer-defined supported languages.

To perform this operation, the code splits the user-controlled input string compLang into an array using the hyphen delimiter. It then loops backward through this array, performing slice and join operations in each iteration to generate candidate strings. These candidates are subsequently looked up in the supported languages array using indexOf.

This specific sequence of operations introduces a quadratic time complexity O(N^2), where N represents the number of hyphenated segments in the input string. Because JavaScript runtimes operate on a single-threaded event loop, executing hundreds of thousands of string copying and concatenation operations synchronously halts all execution. As a result, the entire server process becomes unresponsive to concurrent HTTP traffic while processing a single malicious request.

Code Analysis

To understand the technical mechanics of the flaw, compare the vulnerable implementation with the patched version. The vulnerable implementation in versions 4.12.0 through 4.12.33 relies on an input-driven loop:

// Vulnerable Implementation
const parts = compLang.split('-')
for (let i = parts.length - 1; i > 0; i--) {
  // O(i) slice and O(i) join operations within a loop of length N
  const candidate = parts.slice(0, i).join('-')
  const prefixIndex = compSupported.indexOf(candidate)
  if (prefixIndex !== -1) {
    return options.supportedLanguages[prefixIndex]
  }
}

The patched version, implemented in commit f70e2c31684387b3231cc38512a31df6ca76a1c7, reverses the evaluation direction. Instead of truncating the user input, the routine loops over the static, developer-defined array of supported languages:

// Patched Implementation in v4.12.34
let longestMatchIndex = -1
let longestMatchLength = -1
for (let i = 0; i < compSupported.length; i++) {
  const candidate = compSupported[i]
  if (
    candidate.length < compLang.length &&
    candidate.length > longestMatchLength &&
    compLang.startsWith(candidate) &&
    compLang[candidate.length] === '-'
  ) {
    longestMatchIndex = i
    longestMatchLength = candidate.length
  }
}
if (longestMatchIndex !== -1) {
  return options.supportedLanguages[longestMatchIndex]
}

This architectural shift bounds the computational complexity to O(M * L), where M is the number of supported languages and L is the length of the matching prefix. Because the developer controls the size of M, the execution time remains small and independent of the attacker's input length.

Exploitation Methodology

Exploitation of CVE-2026-71848 requires no privileges or special authentication state. An attacker needs network access to any endpoint exposing the languageDetector middleware. By default, the middleware parses the query string parameter lang, cookies, or the Accept-Language HTTP header, meaning any of these vectors can be utilized.

The payload is constructed by concatenating a single-character subtag with a hyphen repeatedly. For example, a payload sequence such as x- repeated 30,000 times generates a string of 60,000 characters with 30,000 individual segments.

When sent to the target server via curl or fetch, this payload forces the underlying V8 or JavaScript runtime to execute approximately 450 million iterations of copying and joining operations. This blocks the main thread for several seconds, dropping the server's availability to zero for all other clients during that execution window.

Impact Assessment

The security impact of this vulnerability is a complete Denial of Service (DoS) for the affected service instance. Because Hono is highly optimized for serverless, edge, and containerized environments, the severity of the impact depends on the hosting runtime environment.

In containerized and persistent server environments (such as Node.js or Bun running on virtual machines or Kubernetes), a continuous stream of such requests will saturate the server's CPU. This results in prolonged downtime and forces manual scaling or service restarts to recover availability.

In serverless environments (such as Cloudflare Workers or AWS Lambda), individual execution limits or timeout thresholds may terminate the blocked worker. However, this still leads to increased latency, potential cost inflation due to CPU usage bills, and localized denial of service during execution peaks.

Remediation and Long-Term Security

The recommended remediation is to upgrade the Hono framework dependency to version 4.12.34 or later. This replaces the vulnerable loop with the safer configuration-driven prefix checking routine.

For environments where immediate upgrading is not possible, security teams should implement edge-level mitigations. Specifically, configure web application firewalls (WAF) or reverse proxies to enforce limits on maximum header sizes and query string lengths.

Additionally, a custom regex rule can be deployed at the API gateway to filter out incoming requests containing excessive hyphenated patterns. A rule pattern such as ([a-zA-Z0-9]+-){50,} can effectively detect and drop anomalous language strings before they reach the Node.js or serverless execution layer.

Fix Analysis (1)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Affected Systems

Hono Framework languageDetector Middleware

Affected Versions Detail

Product
Affected Versions
Fixed Version
hono
honojs
>= 4.12.0, <= 4.12.334.12.34
AttributeDetail
CWE IDCWE-407 (Inefficient Algorithmic Complexity)
Attack VectorNetwork (AV:N)
CVSS Score5.3
Exploit StatusProof of Concept (PoC) available
KEV StatusNot Listed
ImpactDenial of Service (DoS)

MITRE ATT&CK Mapping

T1499.003Endpoint Denial of Service: Application Exhaustion
Impact
CWE-407
Inefficient Algorithmic Complexity

The program uses an algorithm with an inefficient complexity that can be triggered by a specific input, leading to excessive CPU consumption.

References & Sources

  • [1]GitHub Security Advisory GHSA-54fx-42gc-7vw4
  • [2]Fix Commit f70e2c316
  • [3]Hono v4.12.34 Release Notes

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 3 hours ago•CVE-2026-9639
6.5

CVE-2026-9639: Authenticated Denial of Service via Nil-Pointer Dereference in Canonical LXD Custom Volume Backup Import

CVE-2026-9639 (GHSA-j93m-3j9p-m5m8) is a null pointer dereference vulnerability in Canonical LXD affecting versions 5.0.0 through 5.21.4 and 6.0 through 6.8. The flaw resides in the (*lxdBackend).CreateCustomVolumeFromBackup method within lxd/storage/backend_lxd.go. An authenticated attacker with the can_create_storage_volumes permission can upload a crafted custom volume backup tarball that omits the expires_at field on a snapshot entry, triggering an unhandled SIGSEGV panic and terminating the LXD daemon.

Amit Schendel
Amit Schendel
5 views•9 min read
•about 4 hours ago•CVE-2026-33050
8.8

CVE-2026-33050: OS Command Injection in GeoNode Vector Upload Handler

An operating system command injection vulnerability (CWE-78) exists in GeoNode versions prior to 5.1.0. The vulnerability occurs in the vector upload processing pipeline when handling user-supplied geospatial files. By supplying a crafted layer name containing shell metacharacters, an authenticated attacker with basic data upload privileges can execute arbitrary commands on the underlying server or container hosting the GeoNode application and Celery worker processes.

Alon Barad
Alon Barad
5 views•9 min read
•about 5 hours ago•CVE-2026-46429
5.5

CVE-2026-46429: Unrestricted File Upload and Validation Bypass in GeoNode

GeoNode versions prior to 5.0.3 contain an unrestricted file upload vulnerability (CWE-434) within the document and dataset ingestion architecture. Authenticated low-privileged users can bypass upload validation via direct REST API interactions, file extension masquerading, metadata mutation via PATCH requests, or malicious archive submissions. This allows attackers to store and serve dangerous file types, alter on-disk file references, or trigger path traversal and resource exhaustion during archive extraction.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 6 hours ago•CVE-2026-55649
6.3

CVE-2026-55649: Stored Cross-Site Scripting in GeoNode Document Metadata Abstract Field

CVE-2026-55649 is a stored Cross-Site Scripting (XSS) vulnerability in GeoNode versions prior to 5.0.3. The flaw exists because document abstract metadata fields are ingested via the metadata management pipeline and stored in the backend database without HTML sanitization or input neutralization. An authenticated attacker with privileges to create or edit document metadata can inject arbitrary HTML and JavaScript payloads into these fields. When another user, such as an administrator, views the affected document page or catalog listing, the unencoded payload is rendered into the Document Object Model (DOM) and executes within the victim's browser session.

Amit Schendel
Amit Schendel
7 views•9 min read
•about 7 hours ago•GHSA-QX75-2P3R-PWM5
7.7

CVE-2026-55622: Cross-Project Instance Copy Authorization Bypass in Canonical LXD and LXC Incus

CVE-2026-55622 (GHSA-qx75-2p3r-pwm5) is an improper access control vulnerability (CWE-284) in Canonical LXD and LXC Incus (tracked as GHSA-c9f5-j9c3-mhrg). In multi-tenant deployments utilizing project-based isolation, the REST API handler for instance creation via POST /1.0/instances verifies that the authenticated user has authorization in the destination project specified by the query parameter, but fails to verify whether the user holds read or view permissions for the source instance when executing a copy operation across projects. Consequently, an authenticated client restricted to a single project can clone instances or snapshots from unauthorized projects into their own project, resulting in complete disclosure of the target instance filesystem and embedded credentials.

Amit Schendel
Amit Schendel
6 views•11 min read
•about 8 hours ago•GHSA-7MR3-28H5-M5VX
7.7

GHSA-7mr3-28h5-m5vx: Authorization Bypass and Cross-Project Volume Copy in Canonical LXD

An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.

Alon Barad
Alon Barad
5 views•10 min read