{"id":"CVE-2026-115274","title":"Unbounded integer parsing in JSON.decode/1 enables CPU and memory exhaustion denial of service in Elixir","summary":"Improper Validation of Specified Quantity in Input vulnerability in the Elixir standard library's JSON module allows an unauthenticated attacker who supplies a JSON document to cause a denial of service through CPU and memory exhaustion.…","severity":"medium","cvss":6.9,"cvssVector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","cvssSource":"cna","cwe":["CWE-1284"],"vendor":"elixir-lang","product":"elixir","affected":["elixir >= 1.18.0-rc.0 < 1.18.6","elixir >= 1.19.0-rc.0 < 1.19.7","elixir >= 1.20.0-rc.0 < 1.20.5","elixir-lang/elixir >= 793c1147210388587defb649f25f293ffbfa6b1b < *"],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-10-30T16:51:17.679403Z"},"exploitAvailable":true,"published":"2026-10-30","updated":"2026-10-30","sourceUpdated":"2026-10-30T16:51:45.396Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-115274","references":[{"url":"https://github.com/elixir-lang/elixir/security/advisories/GHSA-rp5q-xqhq-926h","label":"Unbounded integer parsing in JSON.decode/1 enables CPU and memory exhaustion denial of service in Elixir"},{"url":"https://cna.erlef.org/cves/CVE-2026-115274.html","label":"EEF CNA record for CVE-2026-115274"},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-115274","label":"OSV record EEF-CVE-2026-115274"},{"url":"https://github.com/elixir-lang/elixir/commit/793c1147210388587defb649f25f293ffbfa6b1b","label":"Introducing commit 793c114 in elixir-lang/elixir"},{"url":"https://github.com/elixir-lang/elixir/commit/c81f12265919c34a0d5134f1905a4eb4edaea1c2","label":"Fix commit c81f122 in elixir-lang/elixir"},{"url":"https://github.com/elixir-lang/elixir/commit/7154e8781da9fd016a973ea01776a011c8b5726a","label":"Fix commit 7154e87 in elixir-lang/elixir"},{"url":"https://github.com/elixir-lang/elixir/commit/cd158efacdc10b30232864251747dff9b8387dfe","label":"Fix commit cd158ef in elixir-lang/elixir"},{"url":"https://github.com/elixir-lang/elixir/commit/ee5cc23f8928aa5a0f25bb7f28e42ecfc7b7d396","label":"Fix commit ee5cc23 in elixir-lang/elixir"}],"tags":["cve.org","exploit-available"],"epss":0.00498,"epssPercentile":0.42957,"ingestedAt":"2026-11-05T16:24:31.097Z","slug":"CVE-2026-115274","body":"## Overview\n\nImproper Validation of Specified Quantity in Input vulnerability in the Elixir standard library's JSON module allows an unauthenticated attacker who supplies a JSON document to cause a denial of service through CPU and memory exhaustion.\n\nJSON.decode/1 and JSON.decode!/1 convert each integer literal with erlang:binary_to_integer/1 and do not bound its length. A literal of one million digits decodes successfully but costs 100 to 300 times as much CPU as a string of the same length, so one request body of a few megabytes holds a scheduler for about a second. A literal of more than about 1.29 million digits raises SystemLimitError. Applications generated by phx.new decode request bodies with JSON in Plug.Parsers, before routing and authentication.\n\nThis issue affects elixir: from 1.18.0-rc.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.\n\n## Affected\n\n- `elixir >= 1.18.0-rc.0 < 1.18.6`\n- `elixir >= 1.19.0-rc.0 < 1.19.7`\n- `elixir >= 1.20.0-rc.0 < 1.20.5`\n- `elixir-lang/elixir >= 793c1147210388587defb649f25f293ffbfa6b1b < *`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.\n\n### Workarounds\n\nDecode untrusted JSON with an integer decoder that rejects long digit runs before conversion:\n\ndefmodule SafeJSON do\n  def decode!(binary) do\n    case JSON.decode(binary, :ok, integer: &safe_integer/1) do\n      {decoded, :ok, \"\"} -> decoded\n      _ -> raise ArgumentError, \"invalid JSON\"\n    end\n  end\n\n  defp safe_integer(digits) when byte_size(digits) <= 1024, do: String.to_integer(digits)\n  defp safe_integer(_digits), do: raise(ArgumentError, \"integer too long\")\nend\n\nIn Phoenix, pass SafeJSON to Plug.Parsers as json_decoder instead of Phoenix.json_library().","depth":"twilight","depthScore":50,"depthScoreParts":{"impact":38,"likelihood":0.1,"exploitation":12,"ransomware":0},"changes":[]}