CVE-2026-32686: CWE-400 Uncontrolled Resource Consumption in ericmj decimal
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.
AI Analysis
Technical Summary
CVE-2026-32686 describes an uncontrolled resource consumption vulnerability (CWE-400) in the ericmj decimal library. The library does not bound the exponent on parsed decimal inputs, enabling attackers to supply extremely large exponents that cause exponential memory growth during operations such as add, subtract, divide, to_string, to_integer, round, and compare. This is due to tail-recursive multiplication and list duplication proportional to the exponent value. The impact is an unauthenticated remote denial of service by exhausting memory and crashing the BEAM node. Mitigations were introduced in version 2.4.0 but are not enabled by default, so this version is not considered fully patched. A patch is available but the exact fixed version is not specified in the input data.
Potential Impact
An attacker can cause a denial of service by sending decimal inputs with very large exponents to any system using the ericmj decimal library that performs arithmetic or conversions on user-supplied decimals. This can lead to Out-of-Memory exceptions and crash the BEAM runtime, potentially taking down the affected node with a single request. The vulnerability affects unauthenticated remote users and can be triggered via common input vectors such as JSON, form fields, or Ecto decimal fields.
Mitigation Recommendations
A patch is available for this vulnerability. Although version 2.4.0 includes mitigations, they are not enabled by default and thus it is not considered a fully patched version. Users should upgrade to a version where the mitigations are enabled by default once such a version is released. Until then, consider implementing input validation to restrict exponent sizes on decimal inputs to prevent exploitation.
CVE-2026-32686: CWE-400 Uncontrolled Resource Consumption in ericmj decimal
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.
CVSS v4.0
Score 6.9medium
Affected software
ericmj
decimal
ericmj
decimal
cpe:2.3:a:ericmj:decimal:*:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-32686 describes an uncontrolled resource consumption vulnerability (CWE-400) in the ericmj decimal library. The library does not bound the exponent on parsed decimal inputs, enabling attackers to supply extremely large exponents that cause exponential memory growth during operations such as add, subtract, divide, to_string, to_integer, round, and compare. This is due to tail-recursive multiplication and list duplication proportional to the exponent value. The impact is an unauthenticated remote denial of service by exhausting memory and crashing the BEAM node. Mitigations were introduced in version 2.4.0 but are not enabled by default, so this version is not considered fully patched. A patch is available but the exact fixed version is not specified in the input data.
Potential Impact
An attacker can cause a denial of service by sending decimal inputs with very large exponents to any system using the ericmj decimal library that performs arithmetic or conversions on user-supplied decimals. This can lead to Out-of-Memory exceptions and crash the BEAM runtime, potentially taking down the affected node with a single request. The vulnerability affects unauthenticated remote users and can be triggered via common input vectors such as JSON, form fields, or Ecto decimal fields.
Mitigation Recommendations
A patch is available for this vulnerability. Although version 2.4.0 includes mitigations, they are not enabled by default and thus it is not considered a fully patched version. Users should upgrade to a version where the mitigations are enabled by default once such a version is released. Until then, consider implementing input validation to restrict exponent sizes on decimal inputs to prevent exploitation.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-03-13T09:12:14.474Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69fca37ecbff5d8610fd578b
Added to database: 05/07/2026, 14:36:46 UTC
Last enriched: 08/05/2026, 17:30:01 UTC
Last updated: 09/11/2026, 19:42:47 UTC
Views: 94
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.