Description

NCalc is a fast, lightweight expression evaluator for .NET. Prior to 6.1.1, the factorial operator implementation in src/NCalc.Core/Helpers/MathHelper.cs permits specially crafted expressions with extremely large factorial operands, causing excessive CPU consumption or a non-terminating loop due to integer overflow in the factorial calculation logic when applications evaluate untrusted expressions. This issue is fixed in version 6.1.1.

Severity (CVSS)

Base score4.8
SeverityMedium
VersionCVSS 3.1
VectorCVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
Provided byCNA

Weaknesses

  • CWE-770 — CWE-770: Allocation of Resources Without Limits or Throttling
  • CWE-190 — CWE-190: Integer Overflow or Wraparound

Affected products

VendorProductVersions
ncalcncalc< 6.1.1

References

Authoritative sources

This page is a snapshot. For the latest enrichment and updates, view the record on CVE.org or the NVD.

Generated from the official CVE List on 18 Jul 2026 07:00 UTC.