---
id: CVE-2026-113436
title: Quadratic bignum parsing of Content-Length and Host port values in Bandit
summary: >-
  Inefficient Algorithmic Complexity vulnerability in the header integer parser
  of mtrudel bandit allows an unauthenticated remote attacker to consume server
  CPU via a content-length value or a Host or :authority port made of thousands
  of …
severity: high
cvss: 8.7
cvssVector: 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'
cvssSource: cna
cwe:
  - CWE-407
vendor: mtrudel
product: bandit
affected:
  - bandit >= 1.0.0-pre.7 < 1.14.0
  - >-
    mtrudel/bandit >= e0c8c0c30af9b0f57d8aafac37ddd9294363a8be <
    220b9dfd27f9a21305be2afc75cbe585ddc24e7a
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: partial
  timestamp: '2026-10-26T15:12:04.626946Z'
published: '2026-10-26'
updated: '2026-10-26'
sourceUpdated: '2026-10-26T15:35:51.556Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-113436'
references:
  - url: 'https://github.com/mtrudel/bandit/security/advisories/GHSA-29cr-8477-rg6r'
    label: Quadratic bignum parsing of Content-Length and Host port values in Bandit
  - url: 'https://cna.erlef.org/cves/CVE-2026-113436.html'
    label: EEF CNA record for CVE-2026-113436
  - url: 'https://osv.dev/vulnerability/EEF-CVE-2026-113436'
    label: OSV record EEF-CVE-2026-113436
  - url: >-
      https://github.com/mtrudel/bandit/commit/e0c8c0c30af9b0f57d8aafac37ddd9294363a8be
    label: Introducing commit e0c8c0c in mtrudel/bandit
  - url: >-
      https://github.com/mtrudel/bandit/commit/220b9dfd27f9a21305be2afc75cbe585ddc24e7a
    label: Fix commit 220b9df in mtrudel/bandit
tags:
  - cve.org
ingestedAt: '2026-10-26T14:27:31.820Z'
epss: 0.00602
epssPercentile: 0.48944
---

## Overview

Inefficient Algorithmic Complexity vulnerability in the header integer parser of mtrudel bandit allows an unauthenticated remote attacker to consume server CPU via a content-length value or a Host or :authority port made of thousands of digits.

Bandit.Headers.parse_integer/2 in lib/bandit/headers.ex builds the number one digit at a time with no limit on the digit count, allocating a new bignum at each step, so one value costs time quadratic in its length. It runs on raw request input over HTTP/1 and HTTP/2, before any range check. Over HTTP/2, a 4,000-digit value can be stored once in the HPACK dynamic table and re-sent on each new stream for about one byte: 124 KB of traffic kept the server busy for 27.9 s.

This issue affects bandit: from 1.0.0-pre.7 before 1.14.0.

## Affected

- `bandit >= 1.0.0-pre.7 < 1.14.0`
- `mtrudel/bandit >= e0c8c0c30af9b0f57d8aafac37ddd9294363a8be < 220b9dfd27f9a21305be2afc75cbe585ddc24e7a`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
