Skip to main content

ericmj decimal CVE-2026-32686

| EUVDEUVD-2026-28376 MEDIUM
Uncontrolled Resource Consumption (CWE-400)
2026-05-07 EEF GHSA-rhv4-8758-jx7v
6.9
CVSS 4.0 · Vendor: EEF
View

Attack ChainAIDerived

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

  1. Recon
    User supplies crafted JSON with malicious decimal exponent
  2. Delivery
    Application deserializes JSON and calls Decimal.parse/1 or cast/1
  3. Exploit
    Parser accepts unbounded exponent without validation
  4. Install
    Application performs arithmetic or formatting operation
  5. C2
    Memory allocation proportional to exponent magnitude
  6. Execute
    Heap exhaustion
  7. Impact
    BEAM 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.

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 – 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

decimal bc11f4a2b6fb61fc1360a0ab4e79141bba918841 <6a523f3a73b8c9974540e21c7aa88f1258bb35ae
decimal 0.1.0 <3.0.0

Affected Packages

euvd decimal fix: 3.0.0

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

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

Primary rating from Vendor (EEF) · only source for this CVE.

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

Lifecycle Timeline

3
CVSS changed
May 07, 2026 - 15:22 NVD
6.9 (MEDIUM)
CVE Published
May 07, 2026 - 14:04 nvd
UNKNOWN (no severity yet)
CVE Published
May 07, 2026 - 14:04 nvd
MEDIUM 6.9

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

EPSS Score
0.1%
Top 78% exploitable
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

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 Yes
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
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

54
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: +20
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