Inefficient Algorithmic Complexity Affecting bandit package, versions >=1.0.0-pre.7 <1.14.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.6% (49th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-HEX-BANDIT-21755426
  • published27 Oct 2026
  • disclosed26 Oct 2026
  • creditPeter Ullrich

Introduced: 26 Oct 2026

NewCVE-2026-113436  (opens in a new tab)
CWE-407  (opens in a new tab)

How to fix?

Upgrade bandit to version 1.14.0 or higher.

Overview

bandit is a HTTP server for Plug and WebSock apps.

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via parse_content_length in lib/bandit/headers.ex, which delegates to Integer.parse/1 for parsing numeric header values. An unauthenticated attacker can send HTTP/2 HEADERS frames carrying a content-length value composed of thousands of digit characters, causing Integer.parse/1 to consume CPU time grossly disproportionate to the size of the traffic sent, resulting in a server-side CPU exhaustion crash.

PoC

1. Run Bandit with any Plug.
2. Open an HTTP/2 connection with prior knowledge and complete the SETTINGS exchange.
3. In one write, send 5,000 HEADERS frames for `POST /` on new streams, each carrying a `content-length` of 4,000 `9` digits encoded with HPACK indexing, so that every frame after the first refers to the stored value.
4. The 124,003 bytes take 27.9 s to process before all 5,000 requests reach the Plug.

Note: The PoC states no specific environment, operating system, or non-default configuration.

CVSS Base Scores

version 4.0
version 3.1