Skip to main content

CVE-2026-97853: CWE-789 Memory Allocation with Excessive Size Value in ericmj decimal

0
Medium
VulnerabilityCVE-2026-97853cvecve-2026-97853cwe-789
Published: 10/10/2026 (10/10/2026, 19:43:45 UTC)
Source: CVE Database V5
Vendor/Project: ericmj
Product: decimal

Description

CVE-2026-97853 is a memory allocation vulnerability in the ericmj decimal library affecting versions from 0.1.0 up to but not including 3.1.2. The Decimal.round/3 function can allocate excessive memory when given a large 'places' argument, potentially leading to denial of service by exhausting system memory and crashing the BEAM VM. This occurs because the function builds a large charlist of zero digits proportional to the 'places' argument before applying context precision. Applications that allow unbounded user input for the number of decimal places are vulnerable.

CVSS v4.0

Score 6.9medium

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

ericmj

decimal

Affected versions
>=0.1.0 <3.1.2

ericmj

decimal

decimal
pkg:hex/decimal
Affected versions
>=0.1.0 <3.1.2
GitHub Actionsmore threats →cve
ericmj/decimal
pkg:github/ericmj/decimal
CPE configurations
cpe:2.3:a:ericmj:decimal:*:*:*:*:*:*:*:*

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/10/2026, 20:18:40 UTC

Technical Analysis

The vulnerability in ericmj decimal's Decimal.round/3 function arises from memory allocation with an excessive size value. Specifically, when rounding decimals with a large positive or negative 'places' argument, the function constructs a charlist of zero digits proportional to the absolute value of 'places' before applying precision limits. For example, calling Decimal.round(Decimal.new("1.5"), -50_000_000) can allocate approximately 5.5 GB of memory, which can exhaust available system memory and cause the BEAM VM to terminate. Older versions also consume CPU in proportion to 'places' due to looping behavior. The issue affects all versions from 0.1.0 up to but excluding 3.1.2. Input limits added for a related CVE do not cover this 'places' argument, leaving applications that accept user-supplied 'places' values without bounds exposed to denial of service.

Potential Impact

The impact is denial of service caused by excessive memory allocation leading to potential exhaustion of system memory and termination of the BEAM virtual machine. This can disrupt availability of applications using the vulnerable decimal library when processing untrusted input for decimal rounding.

Mitigation Recommendations

No explicit patch or fix is stated in the provided data. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, applications should implement input validation to bound the 'places' argument passed to Decimal.round/2 or Decimal.round/3 to prevent excessive memory allocation. Avoid accepting untrusted or unbounded user input for this parameter.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
EEF
Date Reserved
2026-10-09T00:30:01.645Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6aca9a362cdf04f6564c304a

Added to database: 10/10/2026, 20:04:06 UTC

Last enriched: 10/10/2026, 20:18:40 UTC

Last updated: 10/10/2026, 20:18:58 UTC

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses