{"id":"CVE-2026-32686","published":"2026-05-07T14:04:47Z","modified":"2026-11-19T08:33:10Z","title":"Unbounded exponent in decimal enables unauthenticated DoS","vendor":"ericmj","product":"decimal","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.9,"severity":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00484,"percentile":0.42646,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"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","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-32686","tags":["related"]},{"url":"https://github.com/ericmj/decimal/commit/bc11f4a2b6fb61fc1360a0ab4e79141bba918841","tags":["related"]},{"url":"https://github.com/ericmj/decimal/commit/6a523f3a73b8c9974540e21c7aa88f1258bb35ae","tags":["patch"]}],"priority":{"score":13.4,"factors":[{"name":"EPSS percentile","points":8.53},{"name":"CVSS severity","points":4.83}]},"vendorSlug":"ericmj","affectedVersions":[{"vendor":"ericmj","product":"decimal","versions":[">= 0.1.0, < 3.0.0"]},{"vendor":"ericmj","product":"decimal","versions":[">= bc11f4a2b6fb61fc1360a0ab4e79141bba918841, < 6a523f3a73b8c9974540e21c7aa88f1258bb35ae"]}],"capec":[{"id":"CAPEC-130","name":"Excessive Allocation"}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-05-08T22:42:13.343081Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Hex","package":"decimal","vulnerableRanges":[">=0.1.0, <3.0.0"],"patched":["3.0.0"],"from":["GHSA-rhv4-8758-jx7v"],"provenance":"source"}],"summary":{"text":"The decimal library by ericmj does not bound the exponent of parsed input, so a decimal with a very large exponent is accepted and then causes arithmetic, rounding, integer conversion, or string formatting operations to allocate memory proportional to that exponent. An unauthenticated attacker who can supply a decimal value to an application that performs such operations on it can trigger an out-of-memory crash of the BEAM VM with a single request.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:43:04Z"},"euvd":{"id":"EUVD-2026-28376","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-ericmj-decimal-cve-2026-32686","children":[{"from":"CVE-2026-32686","to":"CVE-2026-97853","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"The input limits added for CVE-2026-32686 do not cover the places argument.","from":"CVE.org","in":"CVE-2026-97853"},{"kind":"same-code","provenance":"machine","files":["lib/decimal.ex"],"commits":["https://github.com/ericmj/decimal/commit/bc11f4a2b6fb61fc1360a0ab4e79141bba918841","https://github.com/ericmj/decimal/commit/6a523f3a73b8c9974540e21c7aa88f1258bb35ae","https://github.com/ericmj/decimal/commit/05bb73eb40ddef24eda782d905766f56a3660522","https://github.com/ericmj/decimal/commit/338f42c8cf6a9749ab70c5af04734c6050ca3dc6"],"basis":"rarely changed file"}]}]}}