Unbounded allocation in decimal Decimal.round allows DoS
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-789.
Summary
The decimal package by ericmj from 0.1.0 before 3.1.2 is affected. Decimal.round/3 builds the full result for the requested places before applying the context precision, so its cost grows with places (CWE-789). A local attacker without privileges can exhaust memory and get the BEAM VM killed by supplying a large places value in an application that does not bound it.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Upgrade decimal to version 3.1.2, the fixed version. The sources list no fixed version for decimal. Bounding the places argument in calls to Decimal.round limits exposure.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA decimal (ericmj) Fixed in 3.1.2
Vendor assessments
Timeline
- 2026-10-11 Threatist record created from CVE-2026-97853
- 2026-10-11 Priority changed: MEDIUM → LOW
- 2026-10-16 CISA SSVC decision points changed
- 2026-11-06 Affected versions changed · Red Hat
- 2026-11-06 CVSS score added · Red Hat
References
More ericmj vulnerabilities
- TI-2026-25178 Unbounded exponent in decimal enables unauthenticated DoS CVSS 4.0MEDIUM 6.9
Sources
- CVE-2026-97853 · CVE Program
- CVE-2026-97853 · NVD
- FIRST EPSS
- CVE-2026-97853 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences