CVE-2026-109821 in Elixirinfo

Summary

by MITRE • 10/30/2026

Improper Validation of Specified Quantity in Input vulnerability in the Elixir standard library's URI module allows an attacker who supplies a URL to cause a denial of service through CPU exhaustion.

URI.parse/1 converts the port component with String.to_integer/1 in split_authority/1 (lib/elixir/lib/uri.ex) without bounding its length, so a port of up to 1,262,592 decimal digits produces a bignum of that size and a longer one raises SystemLimitError. Rendering the parsed URI back to text (URI.to_string/1, inspect/1, logging, error formatting) converts the bignum with :erlang.integer_to_binary/1, which is quadratic on Erlang/OTP 27, 28 and 29.0: a 400,000-digit port renders in about 2.6 seconds and a 1 MB port in about 18 seconds. Ports above 65535 are also accepted.

This issue affects elixir: from 0.5.0 before 1.18.6, from 1.19.0-rc.0 before 1.19.7, and from 1.20.0-rc.0 before 1.20.5.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 10/30/2026

The Elixir standard library's URI module contains a critical input validation flaw that allows for denial of service attacks through CPU exhaustion. This vulnerability stems from the improper handling of numeric inputs within the URL parsing logic, specifically in how port numbers are processed and converted back to string representations. The core issue lies in the split_authority function found in lib/elixir/lib/uri.ex, which utilizes String.to_integer/1 to convert the port component of a Uniform Resource Identifier into an integer value without imposing any constraints on the length or magnitude of that input. By accepting arbitrarily large numeric strings, the system permits attackers to supply URLs containing ports with hundreds of thousands of decimal digits, effectively bypassing standard validation checks that would typically restrict such values to valid ranges like 0 through 65535.

When a maliciously crafted URL is processed, the String.to_integer/1 function creates an arbitrary-precision integer, commonly referred to as a bignum in Erlang and Elixir environments. While smaller oversized ports might simply raise a SystemLimitError if they exceed internal thresholds, larger inputs result in massive data structures being held in memory. The severity of this vulnerability is significantly amplified during the serialization phase when these parsed URIs are rendered back into text format using functions such as URI.to_string/1, inspect/1, or various logging and error formatting mechanisms. These operations rely on :erlang.integer_to_binary/1 to convert the large bignum back into a string representation for output.

The performance impact is driven by the algorithmic complexity of the integer-to-binary conversion process in recent versions of Erlang OTP 27, 28, and 29.0. The implementation exhibits quadratic time complexity relative to the number of digits in the input. This means that as the size of the port number increases linearly, the processing time required for conversion grows exponentially. For instance, a port number containing approximately four hundred thousand decimal digits can take roughly two point six seconds to render, while an even larger input consisting of one megabyte worth of digit data may require about eighteen seconds to process. In a high-throughput web server or API gateway context where such URIs are frequently parsed and logged, this quadratic scaling effect can rapidly consume available CPU resources, leading to severe latency spikes and eventual service unavailability for legitimate users.

From a security classification perspective, this vulnerability aligns with CWE-20 Improper Input Validation, as the application fails to restrict or reject inputs that exceed expected boundaries. Furthermore, it maps directly to MITRE ATT&CK technique T1496 Resource Hijacking under the sub-technique of CPU Exhaustion, where an attacker leverages computational complexity to degrade system performance rather than exploiting a direct code execution flaw. The lack of bounds checking on numeric fields is a common pattern in legacy parsing libraries that prioritize flexibility over strict adherence to protocol specifications, but it creates a predictable vector for resource exhaustion attacks.

This issue affects multiple versions of the Elixir language runtime, specifically impacting releases from version 0 point five zero prior to one point eighteen six, as well as release candidates and stable builds within the one point nineteen series before one point nineteen seven, and the one point twenty series before one point twenty point five. Organizations running these affected versions are exposed to potential denial of service risks whenever user-supplied URLs are parsed by the standard library URI module. To mitigate this risk, it is imperative that developers upgrade to patched versions where input validation has been strengthened to enforce strict length limits on numeric fields such as ports before they are processed into bignums. Additionally, defensive programming practices should be adopted at the application layer to validate and sanitize all incoming URL data, ensuring that only syntactically correct and reasonably sized inputs reach the core parsing logic, thereby preventing the generation of excessively large integer structures regardless of underlying library updates.

Responsible

EEF

Reservation

10/23/2026

Disclosure

10/30/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

low

Sources

Want to know what is going to be exploited?

We predict KEV entries!