CVE-2026-109821

Unbounded port parsing in URI.parse/1 enables CPU exhaustion denial of service in Elixir

Published Oct 30, 2026 CVSS 4.0 · 6.3 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability arises from the Elixir standard library’s URI module failing to bound the length of a URL’s port component. When a URL with a port of over a million digits is parsed, the library creates an enormous bignum and later attempts to render it back to a string. Rendering such a bignum requires quadratic memory and CPU, causing noticeable delays and eventual exhaustion of resources. As a result, an attacker can trigger a denial‑of‑service attack at the process or system level by supplying a specially crafted URL.

Affected Systems

Elixir releases from 0.5.0 up to before 1.18.6, from 1.19.0‑rc.0 up to before 1.19.7, and from 1.20.0‑rc.0 up to before 1.20.5 are vulnerable. The issue is also present in all Erlang/OTP releases prior to 27.3.4.17, 28.5.0.6, and 29.0.6; upgrading to those or later versions mitigates the problem because the underlying :uri_string module now limits the port length to five digits. Reducing the maximum allowed port number to 65 535 also blocks invalid values.

Risk and Exploitability

The CVSS base score of 6.3 indicates a moderate impact, and the EPSS score is not available, so the likelihood of active exploitation remains uncertain. Nonetheless, the error handling paths that re‑render parsed URIs—such as logging, error messages, or debugging output—constitute the exploitation vector, so any component that receives arbitrary user input and may trigger these paths is at risk. The vulnerability is not currently catalogued in CISA's KEV list, and no active exploit has been reported. Mitigations include upgrading the Elixir runtime or Erlang/OTP to patched releases, or applying the proposed workaround of rejecting excessively long URLs or ports over 65 535 before parsing them.

Remediation

Vendor Workaround

Reject long URLs before parsing them, for example anything above a few kilobytes, and reject a parsed port above 65535 before rendering or using the %URI{}. URI.new/1 is not affected on Erlang/OTP 27.3.4.17, 28.5.0.6, 29.0.6 and later, where :uri_string limits the port to 5 digits.


OpenCVE Recommended Actions

  • Upgrade Elixir to a non‑vulnerable release (>=1.18.6, 1.19.7, or 1.20.5).
  • If upgrading Elixir is not feasible, upgrade Erlang/OTP to version 27.3.4.17, 28.5.0.6, 29.0.6, or later, which constrain port lengths to five digits.
  • Reject URLs longer than a few kilobytes before invoking URI.parse or URI.new, and disallow port values above 65 535.
  • Audit application logs and error handling paths to ensure that no unbounded URI strings are rendered or logged.

Generated by OpenCVE AI on October 30, 2026 at 10:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Unbounded port parsing in URI.parse/1 enables CPU exhaustion denial of service in Elixir
First Time appeared Elixir-lang
Elixir-lang elixir
Weaknesses CWE-1284
CWE-400
CPEs cpe:2.3:a:elixir-lang:elixir:*:*:*:*:*:*:*:*
Vendors & Products Elixir-lang
Elixir-lang elixir
References
Metrics cvssV4_0

{'score': 6.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-1284

    Improper Validation of Specified Quantity in Input

  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
EEF
Published
Updated
Nov 19, 2026, 8:00 AM
Reserved
Oct 23, 2026, 2:00 PM
Status
Deferred
Published
Oct 30, 2026, 9:17 AM
Modified
Oct 30, 2026, 7:39 PM
Severity
Moderate
Public date
Oct 30, 2026, 8:54 AM