Skip to content
Medium 6.9

Vulnerability in decimal

CVE-2026-97853 First seen on SecPulse

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-97853 has been found in decimal.
Risk of unauthorized operations or information disclosure.
What to do: upgrade decimal to 3.1.2 or later.
If unsure, ask your IT team or search "decimal CVE-2026-97853" on the vendor's site.

CVE-2026-97853 (decimal) — CWE-789
Patched: 3.1.2 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

What is the problem

A vulnerability (CWE-789) exists in decimal.

Affected scope

Check the vendor advisory for the affected versions of decimal.

Severity

Severity: ?. Risk of unauthorized operations or information disclosure.

How to fix

Update to 3.1.2.

Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'decimal' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposureidentify
    grep -r 'decimal' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で decimal を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patchpatch
    Upgrade decimal to 3.1.2

    ステージング環境で 3.1.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verificationverify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

PackageAffected → Fixed
Hexdecimal
≥ 0.1.0, < 3.1.2→ 3.1.2
ericmjdecimal
≥ 05bb73eb40ddef24eda782d905766f56a3660522 (no fix yet)→ 338f42c8cf6a9749ab70c5af04734c6050ca3dc6, 3c90af4c3c2dfa4bb4c138760a326dd0eb91822b
Original description The description as published by the source.

Summary

Memory Allocation with Excessive Size Value vulnerability in ericmj decimal allows Denial of Service.

Decimal.round/3 builds the full result for the requested number of decimal places before the context precision (34 digits by default) is applied, so its cost grows with the places argument instead of with the size of the result. For positive places it appends places zero digits to the coefficient as a charlist before converting it to an integer, and for negative places it builds a charlist of -places zero digits. A single call such as Decimal.round(Decimal.new("1.5"), -50_000_000) allocates about 5.5 GB of memory, which can exhaust available memory and get the BEAM VM killed. The oldest releases instead loop once per decimal place, consuming CPU in proportion to places.

Any application that passes a user-supplied number of decimal places or scale to Decimal.round/2 or Decimal.round/3 without bounding it is exposed. The input limits added for CVE-2026-32686 do not cover the places argument.

This issue affects decimal: from 0.1.0 before 3.1.2.

Details

Decimal.round/3 sets the target exponent to -places and do_round/5 materializes the coefficient at that exponent; context/2 only applies the precision afterwards.

  • Positive places (introduced in 1.3.0 by commit 7a83d27): digits ++ Enum.map(1..(exp - target_exp), fn _ -> ?0 end) followed by :erlang.list_to_integer/1 (lib/decimal.ex:2409 in 3.1.1). The list is built before…

Source: NIST National Vulnerability Database NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details