Description
Uncontrolled Resource Consumption vulnerability in ericmj decimal allows unauthenticated remote Denial of Service.

The 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.

Any 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.

This issue affects decimal: from 0.1.0 before 3.0.0.
Published: 2026-05-07
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service
Action: Patch
AI Analysis

Impact

Uncontrolled resource consumption in the ericmj decimal library lets an unauthenticated actor send a decimal string with an arbitrarily large exponent. The library accepts such input without error, but later arithmetic, rounding, or formatting operations allocate memory proportional to the exponent, which can exhaust the BEAM VM’s memory and cause it to crash. As a result, any application that accepts user-supplied decimal input and performs these operations is vulnerable to a single request that triggers an out-of-memory denial of service. This flaw is a CWE-400 uncontrolled resource consumption.

Affected Systems

All releases of the ericmj decimal library from version 0.1.0 up through any release before 3.0.0 are affected. Any application that includes one of those versions and accepts user-supplied decimal strings is vulnerable.

Risk and Exploitability

The CVSS score of 6.9 indicates a moderate-to-high impact. While the EPSS score of 0.00321 (<1%) indicates a low probability of exploitation in general, the lack of authentication or privilege requirements means the exploitability is high for any exposed application that processes untrusted decimal input. An attacker only needs to send a large-exponent decimal string to the target, and the out-of-memory crash can take the process or entire node down if not mitigated. The vulnerability is not listed in CISA KEV.

Generated by OpenCVE AI on September 8, 2026 at 15:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to decimal v3.0.0 or later, which limits exponent size.
  • Validate or sanitize user-supplied decimal strings to reject excessively large exponents before they reach the library.
  • Configure application-level memory limits or process isolation so that a crash does not bring down the entire system and alerts administrators to potential DoS attempts.

Generated by OpenCVE AI on September 8, 2026 at 15:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-rhv4-8758-jx7v Decimal: Unbounded exponent in `Decimal.new` enables unauthenticated DoS
History

Tue, 08 Sep 2026 13:30:00 +0000

Type Values Removed Values Added
Description Uncontrolled Resource Consumption vulnerability in ericmj decimal allows unauthenticated remote Denial of Service. The 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/2), Decimal.to_string/2 with :normal or :xsd format, Decimal.to_integer/1, Decimal.round/3, or Decimal.compare/3 with a threshold allocate memory proportional to the exponent value, which can exhaust available memory and crash the BEAM VM. Any 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. This issue affects decimal: from 0.1.0 before 3.0.0. Uncontrolled Resource Consumption vulnerability in ericmj decimal allows unauthenticated remote Denial of Service. The 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. Any 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. This issue affects decimal: from 0.1.0 before 3.0.0.
References

Fri, 08 May 2026 23:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 07 May 2026 14:30:00 +0000

Type Values Removed Values Added
Description Uncontrolled Resource Consumption vulnerability in ericmj decimal allows unauthenticated remote Denial of Service. The 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/2), Decimal.to_string/2 with :normal or :xsd format, Decimal.to_integer/1, Decimal.round/3, or Decimal.compare/3 with a threshold allocate memory proportional to the exponent value, which can exhaust available memory and crash the BEAM VM. Any 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. This issue affects decimal: from 0.1.0 before 3.0.0.
Title Unbounded exponent in decimal enables unauthenticated DoS
First Time appeared Ericmj
Ericmj decimal
Weaknesses CWE-400
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-09-08T13:08:41.575Z

Reserved: 2026-03-13T09:12:14.474Z

Link: CVE-2026-32686

cve-icon Vulnrichment

Updated: 2026-05-08T22:42:55.384Z

cve-icon NVD

Status : Deferred

Published: 2026-05-07T15:16:05.370

Modified: 2026-09-08T14:17:21.870

Link: CVE-2026-32686

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-08T15:30:18Z

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption