CVE-2026-115274Unbounded integer parsing in JSON.decode/1 enables CPU and memory exhaustion denial of…
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. JSON.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. This 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.
What to do
Fixed builds are available from Debian: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 18.04 | elixir | Fix pending | UBUNTU-CVE-2026-115274 | |
| Ubuntu 16.04 | elixir | Fix pending | UBUNTU-CVE-2026-115274 | |
| Ubuntu 14.04 | elixir | Fix pending | UBUNTU-CVE-2026-115274 | |
| Debian 14 | elixir-lang | Fixed | 1.20.5+dfsg-1 | DEBIAN-CVE-2026-115274 |
| Debian 13 | elixir-lang | Fix pending | DEBIAN-CVE-2026-115274 |
What the vendor says
As published in the CVE record by EEF, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- elixir-lang elixir: affected: 1.18.0-rc.0 to before 1.18.6, 1.19.0-rc.0 to before 1.19.7, 1.20.0-rc.0 to before 1.20.5; fixed in
1.18.6,1.19.7,1.20.5 - elixir-lang elixir: affected: 793c1147210388587defb649f25f293ffbfa6b1b and later; fixed in
7154e8781da9fd016a973ea01776a011c8b5726a
Workaround: Decode untrusted JSON with an integer decoder that rejects long digit runs before conversion: defmodule SafeJSON do def decode!(binary) do case JSON.decode(binary, :ok, integer: &safe_integer/1) do {decoded, :ok, ""} -> decoded _ -> raise ArgumentError, "invalid JSON" end end defp safe_integer(digits) when byte_size(digits) <= 1024, do: String.to_integer(digits) defp safe_integer(_digits), do: raise(ArgumentError, "integer too long") end In Phoenix, pass SafeJSON to Plug.Parsers as json_decoder instead of Phoenix.json_library().
Vendor advisories:
- https://github.com/elixir-lang/elixir/security/advisories/GHSA-rp5q-xqhq-926h (vendor-advisory)
- https://github.com/elixir-lang/elixir/commit/7154e8781da9fd016a973ea01776a011c8b5726a (patch)
- https://github.com/elixir-lang/elixir/commit/c81f12265919c34a0d5134f1905a4eb4edaea1c2 (patch)
- https://github.com/elixir-lang/elixir/commit/cd158efacdc10b30232864251747dff9b8387dfe (patch)
- https://github.com/elixir-lang/elixir/commit/ee5cc23f8928aa5a0f25bb7f28e42ecfc7b7d396 (patch)
References
- https://github.com/elixir-lang/elixir/security/advisories/GHSA-rp5q-xqhq-926h
- https://cna.erlef.org/cves/CVE-2026-115274.html
- https://osv.dev/vulnerability/EEF-CVE-2026-115274
- https://github.com/elixir-lang/elixir/commit/793c1147210388587defb649f25f293ffbfa6b1b
- https://github.com/elixir-lang/elixir/commit/7154e8781da9fd016a973ea01776a011c8b5726a
- https://github.com/elixir-lang/elixir/commit/c81f12265919c34a0d5134f1905a4eb4edaea1c2
- https://github.com/elixir-lang/elixir/commit/cd158efacdc10b30232864251747dff9b8387dfe
- https://github.com/elixir-lang/elixir/commit/ee5cc23f8928aa5a0f25bb7f28e42ecfc7b7d396
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.