CVE-2026-97853: CWE-789 Memory Allocation with Excessive Size Value in ericmj decimal
Description
CVE-2026-97853 is a memory allocation vulnerability in the ericmj decimal library affecting versions from 0.1.0 up to but not including 3.1.2. The Decimal.round/3 function can allocate excessive memory when given a large 'places' argument, potentially leading to denial of service by exhausting system memory and crashing the BEAM VM. This occurs because the function builds a large charlist of zero digits proportional to the 'places' argument before applying context precision. Applications that allow unbounded user input for the number of decimal places are vulnerable.
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
The vulnerability in ericmj decimal's Decimal.round/3 function arises from memory allocation with an excessive size value. Specifically, when rounding decimals with a large positive or negative 'places' argument, the function constructs a charlist of zero digits proportional to the absolute value of 'places' before applying precision limits. For example, calling Decimal.round(Decimal.new("1.5"), -50_000_000) can allocate approximately 5.5 GB of memory, which can exhaust available system memory and cause the BEAM VM to terminate. Older versions also consume CPU in proportion to 'places' due to looping behavior. The issue affects all versions from 0.1.0 up to but excluding 3.1.2. Input limits added for a related CVE do not cover this 'places' argument, leaving applications that accept user-supplied 'places' values without bounds exposed to denial of service.
Potential Impact
The impact is denial of service caused by excessive memory allocation leading to potential exhaustion of system memory and termination of the BEAM virtual machine. This can disrupt availability of applications using the vulnerable decimal library when processing untrusted input for decimal rounding.
Mitigation Recommendations
No explicit patch or fix is stated in the provided data. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, applications should implement input validation to bound the 'places' argument passed to Decimal.round/2 or Decimal.round/3 to prevent excessive memory allocation. Avoid accepting untrusted or unbounded user input for this parameter.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-10-09T00:30:01.645Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6aca9a362cdf04f6564c304a
Added to database: 10/10/2026, 20:04:06 UTC
Last enriched: 10/10/2026, 20:18:40 UTC
Last updated: 10/10/2026, 20:18:58 UTC
Views: 6
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.