Intel

AIKIDO-2026-342302

decimal is vulnerable to Denial of Service (DoS)

CVE-2026-97853Published Oct 13, 2026
October 13, 2026

62

CVE Score

Medium

Denial of Service (DoS)

Are you affected? Scan for Free

TL;DR

Decimal.round/2 and Decimal.round/3 build the full result for a caller supplied places value before the context precision is applied. One call can allocate gigabytes and kill the BEAM VM. A large positive places value raises SystemLimitError after building a long list of zeros, and Decimal.to_integer/1 or Decimal.to_float/1 then builds a power of ten for that zero. The fix caps padding at the context precision and returns 0 or 0.0 for a zero coefficient.

How do I fix this?

Upgrade the decimal library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application passes an untrusted places value to Decimal.round/2 or Decimal.round/3.

Package

Versions

0.1.0 - 3.1.1

Fixed in 3.1.2

Background info

decimal is vulnerable to Denial of Service (DoS) in versions 0.1.0 - 3.1.1.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea