decimal is vulnerable to Denial of Service (DoS)
62
CVE Score
Medium
Denial of Service (DoS)
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.
Upgrade the decimal library to the patch version.
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.
0.1.0 - 3.1.1
Fixed in 3.1.2decimal is vulnerable to Denial of Service (DoS) in versions 0.1.0 - 3.1.1.
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.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.