Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconUser supplies crafted JSON with malicious decimal exponent
-
DeliveryApplication deserializes JSON and calls Decimal.parse/1 or cast/1
-
ExploitParser accepts unbounded exponent without validation
-
InstallApplication performs arithmetic or formatting operation
-
C2Memory allocation proportional to exponent magnitude
-
ExecuteHeap exhaustion
-
ImpactBEAM VM crash
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Applications must accept decimal input from untrusted sources (typically users, JSON payloads, or external data feeds) AND perform at least one of the following operations on the parsed decimal: Decimal.add/2, Decimal.sub/2, Decimal.div/2, Decimal.to_string/2 with :normal or :xsd format, Decimal.to_integer/1, Decimal.round/3, or Decimal.compare/3. The vulnerability is triggered when an attacker supplies a decimal string with an exponent of very large magnitude (e.g., 1e999999999 or greater). Default Elixir/Erlang configurations expose this risk without special configuration-no opt-in behavior or non-standard setup is required. Exploitation is limited only by: (1) the presence of input validation before parsing (if the application checks exponent bounds before calling parse/2), or (2) use of Decimal.parse/2 or Decimal.cast/2 with explicit :max_exponent option set to a finite value less than the attacker's supplied exponent. Applications using only Decimal.to_string/3 with :scientific format and no arithmetic operations may be partially protected, as :scientific format is compact for large exponents, though this should not be relied upon as a substitute for upgrading. |
| Impact | CVSS 6.9 with local attack vector (AV:L) contradicts the CVE description of 'remote denial of service,' indicating a significant data inconsistency requiring clarification from the vendor. The attack vector classification appears incorrect-the vulnerability description explicitly states 'unauthenticated remote Denial of Service' and 'a single malicious request,' both indicating remote exploitability over a network. The CVSS vector also shows AU:X (unknown authentication requirement), making proper authentication assessment impossible from the provided vector alone. However, the vulnerability mechanism itself-accepting untrusted user input to parse/2 or cast/2-is genuinely remote if the application exposes these functions via HTTP, JSON APIs, or similar network interfaces. EPSS score and KEV status are not provided, preventing assessment of real-world exploitation probability. The vulnerability is exploitable (proof-of-concept demonstrable) but requires that affected applications: (1) accept decimal input from untrusted sources, and (2) perform arithmetic or formatting operations on the parsed value. This is a common pattern in financial systems, data processing pipelines, and REST APIs handling decimal payloads. The remediation is straightforward (upgrade to 3.0.0), but widespread adoption of unpatched versions in production systems poses moderate-to-high risk given the ease of exploitation and severity of impact. |
| Exploit ScenarioDerived | An attacker sends a crafted HTTP POST request containing JSON payload with a decimal field value like '{"amount": "1e1000000000"}' to a REST API endpoint that deserializes the JSON and calls Decimal.cast/2 or Decimal.parse/1 on the amount field. The parsing succeeds (in vulnerable versions) and stores the decimal. When the application calls Decimal.to_string/2 to render the decimal for display or logging, or performs Decimal.add/2 to calculate a total, the vulnerable library allocates gigabytes of memory to represent the expanded exponent, exhausting heap and crashing the BEAM VM process. No authentication is required; a single malicious request crashes the service. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 07, 2026
Uncontrolled resource consumption in ericmj decimal library (versions 0.1.0 before 3.0.0) allows remote denial of service via maliciously crafted decimal values with extremely large exponents. When applications parse user-supplied decimal input and subsequently perform arithmetic operations, string formatting, rounding, or comparison, the library allocates memory proportional to the exponent magnitude without bounds, exhausting available memory and crashing the BEAM virtual machine. A single malicious request is sufficient to trigger an out-of-memory crash.
RemediationAI
Vendor-released patch: upgrade to decimal version 3.0.0 or later, which enforces IEEE 754 decimal128 limits by default. The fix applies max_exponent validation (default 6144) at parse time and enforces max_digits limits (default 34 for parsing, 6178 for output) in Decimal.parse/1, Decimal.cast/1, and Decimal.to_string/2, rejecting pathological inputs before they consume memory. For applications unable to immediately upgrade, implement input validation before calling parse/2 or cast/2 by: (1) manually validating exponent magnitude-reject exponents with absolute value exceeding 6144 before parsing, or (2) calling Decimal.parse/2 or Decimal.cast/2 with explicit :max_exponent option set to a reasonable limit (e.g., 1000 for typical financial use cases). Also avoid calling Decimal.to_string/2 with :normal or :xsd formats on untrusted decimals without passing :max_digits option; use :scientific format instead as it expands output only logarithmically with exponent. Advisory: https://github.com/ericmj/decimal/security/advisories/GHSA-rhv4-8758-jx7v
Affected VersionsENISA
Affected Packages
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 is an Elixir implementation for arbitrary-precision decimal arithmetic. The vulnerability exists in the parsing and arithmetic operations subsystems, which fail to enforce limits on exponent magnitude. CWE-400 (Uncontrolled Resource Consumption) identifies the root cause: the library accepts decimal strings with arbitrarily large exponents (e.g., '1e1000000000') without validation, and subsequent operations-including Decimal.add/2, Decimal.sub/2, Decimal.div/2, Decimal.to_string/2 with :normal or :xsd formats, Decimal.to_integer/1, Decimal.round/3, and Decimal.compare/3-allocate internal structures proportional to the exponent value. This creates a resource exhaustion condition where a single pathological input can consume all available heap memory. The fix (commit 6a523f3a73b8c9974540e21c7aa88f1258bb35ae) implements IEEE 754 decimal128 compliance with default exponent limits (emax=6144, emin=-6143, max_digits=34) enforced at parse time and output rendering, preventing materialization of pathological values.
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
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
Primary rating from Vendor (EEF) · only source for this CVE.
CVSS VectorVendor: EEF
Lifecycle Timeline
3DescriptionCVE.org
Uncontrolled Resource Consumption vulnerability in ericmj decimal allows unauthenticated remote Denial of Service.
The decimal library does not bound the exponent on parsed input. Storing a decimal with a very large exponent (e.g. Decimal.new("1e1000000000")) is accepted without error. Subsequent calls to arithmetic functions (Decimal.add/2, Decimal.sub/2, Decimal.div/2), Decimal.to_string/2 with :normal or :xsd format, Decimal.to_integer/1, Decimal.round/3, or Decimal.compare/3 with a threshold allocate memory proportional to the exponent value, which can exhaust available memory and crash the BEAM VM.
Any application that accepts user-supplied decimal input and subsequently performs arithmetic, rounding, conversion to integer, or string formatting on it is exposed. A single malicious request is sufficient to cause an out-of-memory crash.
This issue affects decimal: from 0.1.0 before 3.0.0.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-28376
GHSA-rhv4-8758-jx7v
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB