{"containers":{"cna":{"affected":[{"cpes":["cpe:2.3:a:elixir-lang:elixir:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.URI'","'Elixir.String.Chars.URI'"],"packageName":"elixir","packageURL":"pkg:otp/elixir?repository_url=https:%2F%2Fgithub.com%2Felixir-lang%2Felixir&vcs_url=git%2Bhttps:%2F%2Fgithub.com%2Felixir-lang%2Felixir.git","product":"elixir","programFiles":["lib/uri.ex"],"programRoutines":[{"name":"'Elixir.URI':parse/1"},{"name":"'Elixir.URI':split_authority/1"},{"name":"'Elixir.URI':merge/2"},{"name":"'Elixir.URI':to_string/1"},{"name":"'Elixir.String.Chars.URI':to_string/1"}],"repo":"https://github.com/elixir-lang/elixir","vendor":"elixir-lang","versions":[{"lessThan":"1.18.6","status":"affected","version":"0.5.0","versionType":"semver"},{"lessThan":"1.19.7","status":"affected","version":"1.19.0-rc.0","versionType":"semver"},{"lessThan":"1.20.5","status":"affected","version":"1.20.0-rc.0","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:elixir-lang:elixir:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.URI'","'Elixir.String.Chars.URI'"],"packageName":"elixir-lang/elixir","packageURL":"pkg:github/elixir-lang/elixir","product":"elixir","programFiles":["lib/elixir/lib/uri.ex"],"programRoutines":[{"name":"'Elixir.URI':parse/1"},{"name":"'Elixir.URI':split_authority/1"},{"name":"'Elixir.URI':merge/2"},{"name":"'Elixir.URI':to_string/1"},{"name":"'Elixir.String.Chars.URI':to_string/1"}],"repo":"https://github.com/elixir-lang/elixir","vendor":"elixir-lang","versions":[{"changes":[{"at":"9a39d64a4473d02681c486bc70681c972479d32b","status":"unaffected"},{"at":"b70f33a591b6ab8eb0fa4a7e00bac1c2ed4e0d58","status":"unaffected"},{"at":"07d9abc3f3ac4c8d2ba8384bd102b6d6205b08b7","status":"unaffected"},{"at":"d879b39d778fec2f475689573d5672720c4f2a21","status":"unaffected"}],"lessThan":"*","status":"affected","version":"39801821eef2d06524e5ebf5a0e4b3c380ad23ae","versionType":"git"}]}],"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>The application parses an attacker-supplied URL with <code>URI.parse/1</code>, for example a URL field in a form or JSON request body, and then renders the result or a value containing it. The multi-second render cost requires Erlang/OTP 27, 28 or 29.0; on OTP 29.1 and later rendering a 1 MB port takes under a second. URLs in HTTP headers and the request line are bounded by the server's size limits.</p>"},{"base64":false,"type":"text/markdown","value":"The application parses an attacker-supplied URL with `URI.parse/1`, for example a URL field in a form or JSON request body, and then renders the result or a value containing it. The multi-second render cost requires Erlang/OTP 27, 28 or 29.0; on OTP 29.1 and later rendering a 1 MB port takes under a second. URLs in HTTP headers and the request line are bounded by the server's size limits."}],"value":"The application parses an attacker-supplied URL with URI.parse/1, for example a URL field in a form or JSON request body, and then renders the result or a value containing it. The multi-second render cost requires Erlang/OTP 27, 28 or 29.0; on OTP 29.1 and later rendering a 1 MB port takes under a second. URLs in HTTP headers and the request line are bounded by the server's size limits."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:elixir-lang:elixir:*:*:*:*:*:*:*:*","versionEndExcluding":"1.18.6","versionStartIncluding":"0.5.0","vulnerable":true},{"criteria":"cpe:2.3:a:elixir-lang:elixir:*:*:*:*:*:*:*:*","versionEndExcluding":"1.19.7","versionStartIncluding":"1.19.0-rc.0","vulnerable":true},{"criteria":"cpe:2.3:a:elixir-lang:elixir:*:*:*:*:*:*:*:*","versionEndExcluding":"1.20.5","versionStartIncluding":"1.20.0-rc.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Eric Meadows-Jönsson"},{"lang":"en","type":"reporter","value":"Eric Meadows-Jönsson"},{"lang":"en","type":"remediation developer","value":"José Valim"},{"lang":"en","type":"coordinator","value":"Eric Meadows-Jönsson"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"}],"dateAssigned":"2026-10-25T10:39:55.000Z","datePublic":"2026-10-30T08:54:08.000Z","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Improper Validation of Specified Quantity in Input vulnerability in the Elixir standard library's <code>URI</code> module allows an attacker who supplies a URL to cause a denial of service through CPU exhaustion.</p>\n<p><code>URI.parse/1</code> converts the port component with <code>String.to_integer/1</code> in <code>split_authority/1</code> (<code>lib/elixir/lib/uri.ex</code>) 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 <code>SystemLimitError</code>. Rendering the parsed URI back to text (<code>URI.to_string/1</code>, <code>inspect/1</code>, logging, error formatting) converts the bignum with <code>:erlang.integer_to_binary/1</code>, 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.</p>\n<p>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.</p>"},{"base64":false,"type":"text/markdown","value":"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.\n\n`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.\n\nThis 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."}],"value":"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.\n\nURI.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.\n\nThis 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."}],"impacts":[{"capecId":"CAPEC-130","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>An unauthenticated client that submits a URL with a port of hundreds of thousands of digits makes the server build a bignum of that size, and each later rendering of the parsed URI costs seconds of CPU on Erlang/OTP 27, 28 and 29.0. Sustained requests exhaust CPU on applications that parse and log, store or echo user-supplied URLs.</p>"},{"base64":false,"type":"text/markdown","value":"An unauthenticated client that submits a URL with a port of hundreds of thousands of digits makes the server build a bignum of that size, and each later rendering of the parsed URI costs seconds of CPU on Erlang/OTP 27, 28 and 29.0. Sustained requests exhaust CPU on applications that parse and log, store or echo user-supplied URLs."}],"value":"An unauthenticated client that submits a URL with a port of hundreds of thousands of digits makes the server build a bignum of that size, and each later rendering of the parsed URI costs seconds of CPU on Erlang/OTP 27, 28 and 29.0. Sustained requests exhaust CPU on applications that parse and log, store or echo user-supplied URLs."}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":6.3,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"LOW","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1284","description":"CWE-1284 Improper Validation of Specified Quantity in Input","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-400","description":"CWE-400 Uncontrolled Resource Consumption","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-10-30T09:02:51.828Z","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF"},"references":[{"name":"Unbounded port parsing in URI.parse/1 enables CPU exhaustion denial of service","tags":["vendor-advisory","related"],"url":"https://github.com/elixir-lang/elixir/security/advisories/GHSA-327h-97cv-59xg"},{"name":"EEF CNA record for CVE-2026-109821","tags":["related"],"url":"https://cna.erlef.org/cves/CVE-2026-109821.html"},{"name":"OSV record EEF-CVE-2026-109821","tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-109821"},{"name":"Erlang/OTP advisory for the same issue in uri_string","tags":["related"],"url":"https://github.com/erlang/otp/security/advisories/GHSA-8qw4-2chm-mvj2"},{"name":"Introducing commit 3980182 in elixir-lang/elixir","tags":["related"],"url":"https://github.com/elixir-lang/elixir/commit/39801821eef2d06524e5ebf5a0e4b3c380ad23ae"},{"name":"Fix commit 9a39d64 in elixir-lang/elixir","tags":["patch"],"url":"https://github.com/elixir-lang/elixir/commit/9a39d64a4473d02681c486bc70681c972479d32b"},{"name":"Fix commit b70f33a in elixir-lang/elixir","tags":["patch"],"url":"https://github.com/elixir-lang/elixir/commit/b70f33a591b6ab8eb0fa4a7e00bac1c2ed4e0d58"},{"name":"Fix commit 07d9abc in elixir-lang/elixir","tags":["patch"],"url":"https://github.com/elixir-lang/elixir/commit/07d9abc3f3ac4c8d2ba8384bd102b6d6205b08b7"},{"name":"Fix commit d879b39 in elixir-lang/elixir","tags":["patch"],"url":"https://github.com/elixir-lang/elixir/commit/d879b39d778fec2f475689573d5672720c4f2a21"}],"source":{"discovery":"INTERNAL"},"title":"Unbounded port parsing in URI.parse/1 enables CPU exhaustion denial of service in Elixir","workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Reject long URLs before parsing them, for example anything above a few kilobytes, and reject a parsed <code>port</code> above 65535 before rendering or using the <code>%URI{}</code>. <code>URI.new/1</code> is not affected on Erlang/OTP 27.3.4.17, 28.5.0.6, 29.0.6 and later, where <code>:uri_string</code> limits the port to 5 digits.</p>"},{"base64":false,"type":"text/markdown","value":"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."}],"value":"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."}],"x_proofOfConcept":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ol>\n<li>Build <code>url = \"http://example.com:\" &lt;&gt; String.duplicate(\"9\", 400_000)</code>.</li>\n<li><code>URI.parse(url)</code> returns in about 30 ms.</li>\n<li><code>URI.to_string(URI.parse(url))</code> takes 2,613 ms on OTP 27.3.4.18, 2,604 ms on OTP 28.5 and 108 ms on OTP 29.1.1. With 200,000 digits it takes 654 ms on OTP 27 and 28, so the cost grows 4x per doubling.</li>\n<li>The same digits placed in the path instead of the port parse and render in 1 ms or less.</li>\n<li><code>URI.parse(\"http://example.com:65536\").port</code> returns <code>65536</code>, and a port of 1,262,593 digits raises <code>SystemLimitError</code>.</li>\n</ol>"},{"base64":false,"type":"text/markdown","value":"1. Build `url = \"http://example.com:\" <> String.duplicate(\"9\", 400_000)`.\n2. `URI.parse(url)` returns in about 30 ms.\n3. `URI.to_string(URI.parse(url))` takes 2,613 ms on OTP 27.3.4.18, 2,604 ms on OTP 28.5 and 108 ms on OTP 29.1.1. With 200,000 digits it takes 654 ms on OTP 27 and 28, so the cost grows 4x per doubling.\n4. The same digits placed in the path instead of the port parse and render in 1 ms or less.\n5. `URI.parse(\"http://example.com:65536\").port` returns `65536`, and a port of 1,262,593 digits raises `SystemLimitError`."}],"value":"* Build url = \"http://example.com:\" <> String.duplicate(\"9\", 400_000).\n* URI.parse(url) returns in about 30 ms.\n* URI.to_string(URI.parse(url)) takes 2,613 ms on OTP 27.3.4.18, 2,604 ms on OTP 28.5 and 108 ms on OTP 29.1.1. With 200,000 digits it takes 654 ms on OTP 27 and 28, so the cost grows 4x per doubling.\n* The same digits placed in the path instead of the port parse and render in 1 ms or less.\n* URI.parse(\"http://example.com:65536\").port returns 65536, and a port of 1,262,593 digits raises SystemLimitError."}],"x_technicalAnalysis":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p><strong>1. Unbounded conversion</strong></p>\n<p><code>split_authority/1</code> matches the port with the regex <code>(:(\\d*))?</code> and converts it with <code>String.to_integer/1</code>. Nothing bounds the digit run, so the VM builds an integer of up to 1,262,592 decimal digits (about 30 ms to parse 400,000 digits) and raises <code>SystemLimitError</code> above that, which escapes <code>URI.parse/1</code> instead of producing a <code>%URI{}</code>.</p>\n<p><strong>2. Render cost</strong></p>\n<p><code>URI.to_string/1</code> renders the port with <code>Integer.to_string/1</code>, and <code>inspect/1</code> renders it the same way, both through <code>:erlang.integer_to_binary/1</code>. That conversion is quadratic on OTP 27, 28 and 29.0 and sub-quadratic from OTP 29.1 (<a href=\"https://github.com/erlang/otp/pull/11074\" rel=\"noopener noreferrer\">https://github.com/erlang/otp/pull/11074</a>). Per GHSA-8qw4-2chm-mvj2 it occupies a dirty CPU scheduler for its full duration.</p>\n<p><strong>3. Comparison with <code>URI.new/1</code></strong></p>\n<p>Erlang/OTP limited the port to 5 bytes in <code>:uri_string.parse/1</code> as part of GHSA-8qw4-2chm-mvj2. <code>URI.new/1</code> and <code>URI.new!/1</code> use <code>:uri_string</code> and get that limit on patched OTP versions. <code>URI.parse/1</code> does its own parsing and does not.</p>\n<p><strong>4. Reach</strong></p>\n<p>Header-sourced URLs are bounded by HTTP server limits. Form and JSON body fields are not: Plug's default JSON body limit is 8 MB. One observed library path: a user-supplied URL passed to Req inside a Bandit request exits with the port in its arguments, and Bandit's error logging formats it, which took 2.8 seconds at 400,000 digits on OTP 28.</p>"},{"base64":false,"type":"text/markdown","value":"**1. Unbounded conversion**\n\n`split_authority/1` matches the port with the regex `(:(\\d*))?` and converts it with `String.to_integer/1`. Nothing bounds the digit run, so the VM builds an integer of up to 1,262,592 decimal digits (about 30 ms to parse 400,000 digits) and raises `SystemLimitError` above that, which escapes `URI.parse/1` instead of producing a `%URI{}`.\n\n**2. Render cost**\n\n`URI.to_string/1` renders the port with `Integer.to_string/1`, and `inspect/1` renders it the same way, both through `:erlang.integer_to_binary/1`. That conversion is quadratic on OTP 27, 28 and 29.0 and sub-quadratic from OTP 29.1 (https://github.com/erlang/otp/pull/11074). Per GHSA-8qw4-2chm-mvj2 it occupies a dirty CPU scheduler for its full duration.\n\n**3. Comparison with `URI.new/1`**\n\nErlang/OTP limited the port to 5 bytes in `:uri_string.parse/1` as part of GHSA-8qw4-2chm-mvj2. `URI.new/1` and `URI.new!/1` use `:uri_string` and get that limit on patched OTP versions. `URI.parse/1` does its own parsing and does not.\n\n**4. Reach**\n\nHeader-sourced URLs are bounded by HTTP server limits. Form and JSON body fields are not: Plug's default JSON body limit is 8 MB. One observed library path: a user-supplied URL passed to Req inside a Bandit request exits with the port in its arguments, and Bandit's error logging formats it, which took 2.8 seconds at 400,000 digits on OTP 28."}],"value":"1. Unbounded conversion\n\nsplit_authority/1 matches the port with the regex (:(\\d*))? and converts it with String.to_integer/1. Nothing bounds the digit run, so the VM builds an integer of up to 1,262,592 decimal digits (about 30 ms to parse 400,000 digits) and raises SystemLimitError above that, which escapes URI.parse/1 instead of producing a %URI{}.\n\n2. Render cost\n\nURI.to_string/1 renders the port with Integer.to_string/1, and inspect/1 renders it the same way, both through :erlang.integer_to_binary/1. That conversion is quadratic on OTP 27, 28 and 29.0 and sub-quadratic from OTP 29.1 (https://github.com/erlang/otp/pull/11074). Per GHSA-8qw4-2chm-mvj2 it occupies a dirty CPU scheduler for its full duration.\n\n3. Comparison with URI.new/1\n\nErlang/OTP limited the port to 5 bytes in :uri_string.parse/1 as part of GHSA-8qw4-2chm-mvj2. URI.new/1 and URI.new!/1 use :uri_string and get that limit on patched OTP versions. URI.parse/1 does its own parsing and does not.\n\n4. Reach\n\nHeader-sourced URLs are bounded by HTTP server limits. Form and JSON body fields are not: Plug's default JSON body limit is 8 MB. One observed library path: a user-supplied URL passed to Req inside a Bandit request exits with the port in its arguments, and Bandit's error logging formats it, which took 2.8 seconds at 400,000 digits on OTP 28."}]}},"cveMetadata":{"assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","assignerShortName":"EEF","cveId":"CVE-2026-109821","datePublished":"2026-10-30T08:54:07.752Z","dateReserved":"2026-10-23T14:00:01.560Z","dateUpdated":"2026-10-30T09:02:51.828Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"}