Description
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.
Published: 2026-10-10
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service due to memory exhaustion
Action: Apply Patch
AI Analysis

Impact

This vulnerability is an instance of uncontrolled memory allocation (CWE‑789). The function Decimal.round/3 constructs a character list of zero digits whose length equals the requested number of decimal places before converting the result to an integer. A maliciously large positive or negative places argument can cause the library to allocate gigabytes of memory, exhausting the BEAM virtual machine and terminating the application. The impact is a denial‑of‑service for any user that can influence the places argument.

Affected Systems

The affected library is ericmj decimal, a dependency of many Elixir projects. Versions from 0.1.0 up to and including 3.1.1 are vulnerable. The fix is present in 3.1.2 and later releases.

Risk and Exploitability

The CVSS score of 6.9 classifies this incident as high severity. No EPSS score is available and the vulnerability is not listed in the CISA KEV catalog, indicating no widespread exploitation has been observed to date. An attacker who can supply a large places value to Decimal.round/2 or Decimal.round/3 is able to trigger the allocation of several gigabytes of memory, which can force the BEAM VM to terminate. The feasibility of exploitation depends on whether the application exposes an interface that allows user input to determine the places argument; if such an interface exists, the risk is present.

Generated by OpenCVE AI on October 10, 2026 at 22:35 UTC.

Remediation

Vendor Workaround

Bound places before calling Decimal.round/2,3, for example to -34..34 or to the scales the application supports.


OpenCVE Recommended Actions

  • Upgrade ericmj decimal to version 3.1.2 or later.
  • If an upgrade is not possible, bound the places argument before calling Decimal.round, for example restrict it to the range –34 to 34 or to the scale values the application supports.
  • Validate all user‑supplied decimal scale inputs to ensure they fall within the specified safe range before invoking Decimal.round.

Generated by OpenCVE AI on October 10, 2026 at 22:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 15 Oct 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Sat, 10 Oct 2026 20:00:00 +0000

Type Values Removed Values Added
Description 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.
Title Unbounded allocation in decimal Decimal.round/3 driven by the places argument enables DoS
First Time appeared Ericmj
Ericmj decimal
Weaknesses CWE-789
CPEs cpe:2.3:a:ericmj:decimal:*:*:*:*:*:*:*:*
Vendors & Products Ericmj
Ericmj decimal
References
Metrics cvssV4_0

{'score': 6.9, '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-10-15T18:09:50.720Z

Reserved: 2026-10-09T00:30:01.645Z

Link: CVE-2026-97853

cve-icon Vulnrichment

Updated: 2026-10-15T17:51:22.015Z

cve-icon NVD

Status : Deferred

Published: 2026-10-10T20:16:47.640

Modified: 2026-10-15T19:17:50.310

Link: CVE-2026-97853

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-10T23:00:15Z

Weaknesses
  • CWE-789

    Memory Allocation with Excessive Size Value