Skip to content
OpenAdvisories
Medium · 4.8 CVE-2026-55254 EUVD-2026-45304GHSA-3w5p-95mh-gq75

NCalc: Denial of Service via Unbounded and Non-Terminating Factorial Evaluation

Published Jul 17, 2026 · Updated Jul 20, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
ncalc ncalc < 6.1.1 —

Affected packages

EcosystemPackageAffectedFixedRecord
NuGet NCalc.Core < 6.1.1 6.1.1 GHSA-3w5p-95mh-gq75
NuGet NCalcSync < 6.1.1 6.1.1 GHSA-3w5p-95mh-gq75

References