# CVE-2026-97853: Unbounded allocation in decimal Decimal.round/3 driven by the places argument enables DoS

- Severity: Medium 6.9 (CVSS:4.0, scored by EEF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.14%, higher than 3% of CVEs (2026-12-01)
- Published: 2026-10-10T19:43:45.217Z
- Modified: 2026-11-26T17:23:09.926Z
- Also known as: EEF-CVE-2026-97853, GHSA-6c27-994x-c52f
- Weaknesses: CWE-789
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: EEF

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

(As written by CVE List.)

## Affected

- decimal: from 0.1.0 before 3.1.2
- ericmj/decimal: from 05bb73eb40ddef24eda782d905766f56a3660522 before *
- decimal (Hex): from 0.1.0 before 3.1.2
- https://github.com/ericmj/decimal: from 05bb73eb40ddef24eda782d905766f56a3660522 before 338f42c8cf6a9749ab70c5af04734c6050ca3dc6; before 3c90af4c3c2dfa4bb4c138760a326dd0eb91822b

## Every score

- EEF: CVSS:4.0 6.9 Medium `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`
- Erlang Ecosystem Foundation: CVSS:4.0 `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`

## References

- <https://github.com/ericmj/decimal/security/advisories/GHSA-6c27-994x-c52f> (advisory, vendor-advisory)
- <https://cna.erlef.org/cves/CVE-2026-97853.html> (related, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-97853> (related)
- <https://github.com/ericmj/decimal/commit/05bb73eb40ddef24eda782d905766f56a3660522> (related, web)
- <https://github.com/ericmj/decimal/commit/338f42c8cf6a9749ab70c5af04734c6050ca3dc6> (fix, patch)
- <https://github.com/ericmj/decimal/commit/3c90af4c3c2dfa4bb4c138760a326dd0eb91822b> (fix, patch)
- <https://hex.pm/packages/decimal> (package)

## Sources

- CVE List: [CVE-2026-97853](https://www.cve.org/CVERecord?id=CVE-2026-97853), CVE Terms of Use, modified 2026-11-19
- Erlang Ecosystem Foundation: [EEF-CVE-2026-97853](https://osv.dev/vulnerability/EEF-CVE-2026-97853), CC-BY-4.0, modified 2026-11-26
- NVD: [CVE-2026-97853](https://nvd.nist.gov/vuln/detail/CVE-2026-97853), Public domain, modified 2026-10-15

---

Page: https://cve.day/CVE-2026-97853 · Whole record: https://cve.day/CVE-2026-97853.json · Rebuilt by cve.day 2026-11-26T17:37:11.163Z
