Skip to main content

Elixir Decimal EUVDEUVD-2026-96426

| CVE-2026-97853 MEDIUM
Memory Allocation with Excessive Size Value (CWE-789)
2026-10-10 EEF
6.9
CVSS 4.0 · Vendor: EEF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach endpoint forwarding user rounding scale
  2. Exploit
    Submit huge places value (e.g. -50000000)
  3. Execution
    Decimal.round builds multi-GB charlist
  4. Impact
    Memory exhausted, BEAM VM killed

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
Exploitation Conditions

Exploitation requires the consuming application to pass an attacker-controlled or otherwise unbounded number of decimal places/scale into Decimal.round/2 or Decimal.round/3 (for example a large negative value like -50,000,000, or a large positive places value), because Decimal.round builds the full result before the 34-digit context precision is applied. The LIMITING factor is that this is not triggered by default or fixed-scale library usage - the application must forward untrusted input to this specific function without clamping its magnitude, and the input limits previously added for CVE-2026-32686 explicitly do NOT cover the places argument. There is no authentication requirement or special configuration inside the library itself (PR:N in the supplied vector), but realistic exposure depends entirely on whether a reachable code path relays user input to the places parameter.

Impact

This is a medium-severity availability-only Denial of Service (official CVSS 4.0 base 6.9, VC:N/VI:N/VA:H - no confidentiality or integrity impact). The exploitation status is 'no public exploit identified at time of analysis': there is no CISA KEV listing and no POC flag in the provided intelligence, and no EPSS probability was supplied, so widespread automated exploitation cannot be inferred - absence of these signals is not evidence of safety but does lower immediate priority. SIGNAL CONFLICT TO VERIFY: the official vector sets AV:L (local), yet the description frames the threat as 'any application that passes a user-supplied number of decimal places... without bounding it,' which in practice means a network-facing web/API endpoint forwarding untrusted input - the realistic attack surface is remote, so the AV:L label likely reflects the CNA scoring only the library's direct API rather than the deployed exposure; verify against your own call sites. Net assessment: this is a real, cheaply-triggered DoS (a single call allocates ~5.5 GB) but is strictly conditional on application code forwarding an unbounded places/scale argument to Decimal.round/2 or /3 - it is not an unconditional remote crash of every deployment. Treat as a prompt patch/code-audit item for Elixir services doing user-driven decimal rounding, not a drop-everything emergency.

Exploit ScenarioDerived

An attacker locates a network endpoint in an Elixir application that forwards a user-controlled rounding scale into Decimal.round, then submits a request with an extreme value such as places = -50,000,000. Decimal.round builds a multi-gigabyte zero-digit charlist before applying context precision, allocating roughly 5.5 GB and exhausting memory until the BEAM VM is killed. No public exploit code was identified, but the condition is trivially triggered by a single crafted value and requires no authentication within the library itself.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 10, 2026

Unbounded memory allocation in the ericmj/decimal Elixir library lets an attacker who controls the 'places' argument of Decimal.round/2 or Decimal.round/3 exhaust host memory and get the BEAM VM killed; all releases from 0.1.0 up to (but not including) 3.1.2 are affected. The function materialises the entire rounded result before the 34-digit default context precision is applied, so a single call such as Decimal.round(Decimal.new("1.5"), -50_000_000) allocates roughly 5.5 GB, while the oldest releases instead spin one loop iteration per decimal place and burn CPU in proportion to the argument. The official CVSS 4.0 base score is 6.9 (availability-only, VC:N/VI:N/VA:H), our independent assessment rates it CVSS 3.1 7.5 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, and no public exploit code or confirmed active exploitation was identified at time of analysis. Exposure is conditional: the vulnerability is only reachable when a consuming application forwards an unbounded, user-supplied scale or decimal-place count into round/2 or round/3 - the input limits previously added for CVE-2026-32686 explicitly do not cover the places argument.

RemediationAI

Upgrade the decimal dependency to version 3.1.2 or later - this is a vendor-released patch that replaces the unbounded charlist construction with a bounded digit-division loop (see commits 05bb73eb40ddef24eda782d905766f56a3660522, 338f42c8cf6a9749ab70c5af04734c6050ca3dc6 and 3c90af4c3c2dfa4bb4c138760a326dd0eb91822b); full details are in the advisory at https://github.com/ericmj/decimal/security/advisories/GHSA-6c27-994x-c52f, the CNA record at https://cna.erlef.org/cves/CVE-2026-97853.html and the OSV entry at https://osv.dev/vulnerability/EEF-CVE-2026-97853. If you cannot upgrade immediately, add application-layer clamping: coerce the caller-supplied scale to an integer and reject or clamp it to a small bounded range (for example -20 to 20) before it reaches Decimal.round/2 or round/3, and reject non-integer, NaN, or absurdly large magnitudes outright - the trade-off is that legitimate use cases requiring more than the clamped number of places will silently round differently, so log and alert on rejected values rather than truncating quietly. Note that the earlier input limits introduced for CVE-2026-32686 do not protect the places argument, so reusing that validation is not sufficient. Because the failure mode is memory exhaustion that kills the BEAM VM, also run the affected service under an OS-level memory cgroup and with per-process heap/max_heap_size limits so a single malicious call cannot take down the whole node, and on pre-3.1.x releases (where the behaviour is a per-place CPU loop rather than a large allocation) apply request timeouts and process kill policies - both of these are containment measures only and do not remove the underlying unbounded-argument flaw.

Affected VersionsENISA

decimal 0.1.0 <3.1.2
decimal 05bb73eb40ddef24eda782d905766f56a3660522 <*

Affected Packages

euvd decimal fix: 3.1.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The decimal library implements arbitrary-precision decimal arithmetic in Elixir following the General Decimal Arithmetic / IEEE 754-2008 model, representing numbers as an integer coefficient plus a base-10 exponent, and all operations are normally reduced to a context precision of 34 significant digits. Decimal.round/2 and round/3 (mix of CWE-789, Memory Allocation with Excessive Size Value) violate that design by building the full intermediate result in memory before the context precision is applied, so cost scales with the magnitude of the 'places' argument rather than with the size of the final number. For positive places the implementation appends 'places' zero digits to the coefficient as a charlist and then converts that charlist to an integer; for negative places it constructs a charlist of '-places' zero digits - both are O(places) allocations with no upper bound. The upstream fix (commits 05bb73eb40ddef24eda782d905766f56a3660522, 338f42c8cf6a9749ab70c5af04734c6050ca3dc6 and 3c90af4c3c2dfa4bb4c138760a326dd0eb91822b) rewrites the rounding path as a bounded do_round/5 recursion that repeatedly divides the coefficient by 10 (with a matching do_precision/5 guard clause), eliminating the charlist construction entirely; the accompanying test additions cover truncate, ceiling, floor, half_away_zero, half_up and half_even modes for both positive and negative scales. Affected products are captured by the CPE patterns cpe:2.3:a:ericmj:decimal:*:*:*:*:*:*:*:*, which are wildcarded and therefore do not bound the vulnerable version range - the authoritative range comes from the vendor advisory and is 0.1.0 through 3.1.1.

Know when Decimal gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (EEF) PRIMARY 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
vuln.today AI 7.5 HIGH

Realistic exploitation is through a network app forwarding untrusted places input (AV:N, diverging from the CNA's AV:L), no auth or special precondition in the library (PR:N/AC:L), availability-only impact (A:H).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (EEF).

CVSS VectorVendor: EEF

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
core Elixir/Ecto dependency, but within smaller BEAM ecosystem
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy