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
ncalc: ncalc
References4
- github.com/ncalc/ncalc/security/advisories/GHSA-3w5p-95mh-gq75 PatchVendor Advisory
- github.com/ncalc/ncalc/commit/eeb6155ee1899b1fdf2cda3da35a4f0ca… Patch
- github.com/ncalc/ncalc/pull/575 Issue TrackingPatch
- github.com/ncalc/ncalc/releases/tag/v6.1.1 ProductRelease Notes
Metrics
- CVSS 3.1
-
6.5
MEDIUM
Score source: NVD
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - EPSS — exploit probability
- 0% percentile: 22 · as of 14 November 2026
- CWE
- CWE-190CWE-770
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.