CVE-2026-97853Unbounded allocation in decimal Decimal.round/3 driven by the places argument enables DoS
Memory Allocation with Excessive Size Value vulnerability in ericmj decimal allows Denial of Service. Decimal.round/3 builds the full result for the requested number of decimal places before the context precision (34 digits by default) is applied, so its cost grows with the places argument instead of with the size of the result. For positive places it appends places zero digits to the coefficient as a charlist before converting it to an integer, and for negative places it builds a charlist of -places zero digits. A single call such as Decimal.round(Decimal.new("1.5"), -50_000_000) allocates about 5.5 GB of memory, which can exhaust available memory and get the BEAM VM killed. The oldest releases instead loop once per decimal place, consuming CPU in proportion to places. Any application that passes a user-supplied number of decimal places or scale to Decimal.round/2 or Decimal.round/3 without bounding it is exposed. The input limits added for CVE-2026-32686 do not cover the places argument. This issue affects decimal: from 0.1.0 before 3.1.2.
What to do
None of the Linux distributions or Windows releases we track list an affected package for this CVE. Check the vendor-reported products below.
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
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.
- ericmj decimal: affected: 0.1.0 to before 3.1.2; fixed in
3.1.2 - ericmj decimal: affected: 05bb73eb40ddef24eda782d905766f56a3660522 and later; fixed in
338f42c8cf6a9749ab70c5af04734c6050ca3dc6,3c90af4c3c2dfa4bb4c138760a326dd0eb91822b
Workaround: Bound places before calling Decimal.round/2,3, for example to -34..34 or to the scales the application supports.
Vendor advisories:
- https://github.com/ericmj/decimal/security/advisories/GHSA-6c27-994x-c52f (vendor-advisory)
- https://github.com/ericmj/decimal/commit/338f42c8cf6a9749ab70c5af04734c6050ca3dc6 (patch)
- https://github.com/ericmj/decimal/commit/3c90af4c3c2dfa4bb4c138760a326dd0eb91822b (patch)
References
- https://github.com/ericmj/decimal/security/advisories/GHSA-6c27-994x-c52f
- https://cna.erlef.org/cves/CVE-2026-97853.html
- https://osv.dev/vulnerability/EEF-CVE-2026-97853
- https://github.com/ericmj/decimal/commit/05bb73eb40ddef24eda782d905766f56a3660522
- https://github.com/ericmj/decimal/commit/338f42c8cf6a9749ab70c5af04734c6050ca3dc6
- https://github.com/ericmj/decimal/commit/3c90af4c3c2dfa4bb4c138760a326dd0eb91822b
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.