CVE-2026-97853
Medium 6.9No known exploitationFix availableUnbounded allocation in decimal Decimal.round/3 driven by the places argument enables DoS
Record last updated
CVSS score
Medium on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
Higher than 3% of scored CVEs. A prediction, not evidence.
CISA remediation deadline
Not in the KEV catalog
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.
Weakness: CWE-789
Patching and mitigation
- Patch status
- Fix available (source: CVE record (EEF))
- Fix documented (source date)
- Mitigation
- Bound places before calling Decimal.round/2,3, for example to -34..34 or to the scales the application supports. Source (opens in a new tab)
- Vendor guidance
- github.com (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| ericmj | decimal | from 0.1.0 before 3.1.2 | 3.1.2 | CVE Program |
| ericmj | decimal | 05bb73eb40ddef24eda782d905766f56a3660522 | Not documented | CVE Program |
Timeline
Disclosure
CVE record published by EEF
Source: CVE Program (opens in a new tab)
Patch
Fix documented by CVE record (EEF)
Vendor guidance and references
- Fix commit 338f42c in ericmj/decimal (opens in a new tab)patch
- Fix commit 3c90af4 in ericmj/decimal (opens in a new tab)patch
- GHSA-6c27-994x-c52f (opens in a new tab)vendor-advisory
- EEF CNA record for CVE-2026-97853 (opens in a new tab)related
- Introducing commit 05bb73e in ericmj/decimal (opens in a new tab)related
- OSV record EEF-CVE-2026-97853 (opens in a new tab)related