{"id":"CVE-2026-32686","state":"PUBLISHED","title":"Unbounded exponent in decimal enables unauthenticated DoS","description":"Uncontrolled Resource Consumption vulnerability in ericmj decimal allows unauthenticated remote Denial of Service.\n\nThe decimal library does not bound the exponent on parsed input. Storing a decimal with a very large exponent (e.g. Decimal.new(\"1e1000000000\")) is accepted without error. Subsequent calls to arithmetic functions (Decimal.add/2, Decimal.sub/2, Decimal.div/2M), Decimal.to_string/2M with :normalM or :xsdM format, Decimal.to_integer/1M, Decimal.round/3M, or Decimal.compare/3M with a threshold allocate memory proportional to the exponent value, which can exhaust available memory and crash the BEAM VM.\n\nAny application that accepts user-supplied decimal input and subsequently performs arithmetic, rounding, conversion to integer, or string formatting on it is exposed. A single malicious request is sufficient to cause an out-of-memory crash.\n\nThis issue affects decimal: from 0.1.0 before 3.0.0.","publishedAt":"2026-05-07T14:04:47.222Z","updatedAt":"2026-09-08T13:08:41.575Z","severity":{"score":6.9,"label":"Medium","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","source":"EEF"},"assigner":"EEF","products":["ericmj decimal"],"affected":[{"vendor":"ericmj","product":"decimal","packageName":"decimal","packageURL":"pkg:hex/decimal","defaultStatus":"unaffected","versions":[{"version":"0.1.0","status":"affected","lessThan":"3.0.0","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ericmj:decimal:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Decimal'"],"programFiles":["lib/decimal.ex"],"programRoutines":[{"name":"'Elixir.Decimal':new/1"},{"name":"'Elixir.Decimal':parse/1"},{"name":"'Elixir.Decimal':cast/1"},{"name":"'Elixir.Decimal':add/2"},{"name":"'Elixir.Decimal':sub/2"},{"name":"'Elixir.Decimal':div/2"},{"name":"'Elixir.Decimal':to_string/2"},{"name":"'Elixir.Decimal':to_integer/1"},{"name":"'Elixir.Decimal':round/3"},{"name":"'Elixir.Decimal':compare/3"}],"repo":"https://github.com/ericmj/decimal"},{"vendor":"ericmj","product":"decimal","packageName":"ericmj/decimal","packageURL":"pkg:github/ericmj/decimal","defaultStatus":"unaffected","versions":[{"version":"bc11f4a2b6fb61fc1360a0ab4e79141bba918841","status":"affected","lessThan":"6a523f3a73b8c9974540e21c7aa88f1258bb35ae","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ericmj:decimal:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Decimal'"],"programFiles":["lib/decimal.ex"],"programRoutines":[{"name":"'Elixir.Decimal':new/1"},{"name":"'Elixir.Decimal':parse/1"},{"name":"'Elixir.Decimal':cast/1"},{"name":"'Elixir.Decimal':add/2"},{"name":"'Elixir.Decimal':sub/2"},{"name":"'Elixir.Decimal':div/2"},{"name":"'Elixir.Decimal':to_string/2"},{"name":"'Elixir.Decimal':to_integer/1"},{"name":"'Elixir.Decimal':round/3"},{"name":"'Elixir.Decimal':compare/3"}],"repo":"https://github.com/ericmj/decimal"}],"references":["https://github.com/ericmj/decimal/security/advisories/GHSA-rhv4-8758-jx7v","https://cna.erlef.org/cves/CVE-2026-32686.html","https://osv.dev/vulnerability/EEF-CVE-2026-32686","https://github.com/ericmj/decimal/commit/bc11f4a2b6fb61fc1360a0ab4e79141bba918841","https://github.com/ericmj/decimal/commit/6a523f3a73b8c9974540e21c7aa88f1258bb35ae"],"weaknesses":["CWE-400"],"ingestedAt":"2026-10-29T20:11:40.391Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/32xxx/CVE-2026-32686.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-32686","state":"PUBLISHED","datePublished":"2026-05-07T14:04:47.222Z","dateUpdated":"2026-09-08T13:08:41.575Z","assignerShortName":"EEF","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateReserved":"2026-03-13T09:12:14.474Z"},"containers":{"cna":{"title":"Unbounded exponent in decimal enables unauthenticated DoS","descriptions":[{"lang":"en","value":"Uncontrolled Resource Consumption vulnerability in ericmj decimal allows unauthenticated remote Denial of Service.\n\nThe decimal library does not bound the exponent on parsed input. Storing a decimal with a very large exponent (e.g. Decimal.new(\"1e1000000000\")) is accepted without error. Subsequent calls to arithmetic functions (Decimal.add/2, Decimal.sub/2, Decimal.div/2M), Decimal.to_string/2M with :normalM or :xsdM format, Decimal.to_integer/1M, Decimal.round/3M, or Decimal.compare/3M with a threshold allocate memory proportional to the exponent value, which can exhaust available memory and crash the BEAM VM.\n\nAny application that accepts user-supplied decimal input and subsequently performs arithmetic, rounding, conversion to integer, or string formatting on it is exposed. A single malicious request is sufficient to cause an out-of-memory crash.\n\nThis issue affects decimal: from 0.1.0 before 3.0.0."}],"affected":[{"vendor":"ericmj","product":"decimal","packageName":"decimal","packageURL":"pkg:hex/decimal","defaultStatus":"unaffected","versions":[{"version":"0.1.0","status":"affected","lessThan":"3.0.0","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ericmj:decimal:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Decimal'"],"programFiles":["lib/decimal.ex"],"programRoutines":[{"name":"'Elixir.Decimal':new/1"},{"name":"'Elixir.Decimal':parse/1"},{"name":"'Elixir.Decimal':cast/1"},{"name":"'Elixir.Decimal':add/2"},{"name":"'Elixir.Decimal':sub/2"},{"name":"'Elixir.Decimal':div/2"},{"name":"'Elixir.Decimal':to_string/2"},{"name":"'Elixir.Decimal':to_integer/1"},{"name":"'Elixir.Decimal':round/3"},{"name":"'Elixir.Decimal':compare/3"}],"repo":"https://github.com/ericmj/decimal"},{"vendor":"ericmj","product":"decimal","packageName":"ericmj/decimal","packageURL":"pkg:github/ericmj/decimal","defaultStatus":"unaffected","versions":[{"version":"bc11f4a2b6fb61fc1360a0ab4e79141bba918841","status":"affected","lessThan":"6a523f3a73b8c9974540e21c7aa88f1258bb35ae","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ericmj:decimal:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Decimal'"],"programFiles":["lib/decimal.ex"],"programRoutines":[{"name":"'Elixir.Decimal':new/1"},{"name":"'Elixir.Decimal':parse/1"},{"name":"'Elixir.Decimal':cast/1"},{"name":"'Elixir.Decimal':add/2"},{"name":"'Elixir.Decimal':sub/2"},{"name":"'Elixir.Decimal':div/2"},{"name":"'Elixir.Decimal':to_string/2"},{"name":"'Elixir.Decimal':to_integer/1"},{"name":"'Elixir.Decimal':round/3"},{"name":"'Elixir.Decimal':compare/3"}],"repo":"https://github.com/ericmj/decimal"}],"references":[{"url":"https://github.com/ericmj/decimal/security/advisories/GHSA-rhv4-8758-jx7v","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-32686.html","name":"EEF CNA record for CVE-2026-32686","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-32686","name":"OSV record EEF-CVE-2026-32686","tags":["related"]},{"url":"https://github.com/ericmj/decimal/commit/bc11f4a2b6fb61fc1360a0ab4e79141bba918841","name":"Introducing commit bc11f4a in ericmj/decimal","tags":["related"]},{"url":"https://github.com/ericmj/decimal/commit/6a523f3a73b8c9974540e21c7aa88f1258bb35ae","name":"Fix commit 6a523f3 in ericmj/decimal","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"LOCAL","baseScore":6.9,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-400","description":"CWE-400 Uncontrolled Resource Consumption","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"EEF","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateUpdated":"2026-09-08T13:08:41.575Z"},"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:ericmj:decimal:*:*:*:*:*:*:*:*","versionEndExcluding":"3.0.0","versionStartIncluding":"0.1.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"remediation developer","value":"Eric Meadows-Jönsson / Hex.pm"},{"lang":"en","type":"remediation reviewer","value":"José Valim"},{"lang":"en","type":"remediation reviewer","value":"Wojtek Mach"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"},{"lang":"en","type":"remediation reviewer","value":"ruslandoga"},{"lang":"en","type":"remediation reviewer","value":"Matthew Johnston"}],"impacts":[{"capecId":"CAPEC-130","descriptions":[{"lang":"en","value":"CAPEC-130 Excessive Allocation"}]}],"source":{"discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/ericmj/decimal/security/advisories/GHSA-rhv4-8758-jx7v","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-05-08T22:42:13.343081Z","id":"CVE-2026-32686","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-05-08T22:43:03.396Z"}}]}}}