Vulnerability · Published Jul 17, 2026 · Assigned by GitHub_M
CVE-2026-55254NCalc: Denial of Service via Unbounded and Non-Terminating Factorial Evaluation
Medium 4.8
In plain English
A medium-severity resource allocation without limits in ncalc from ncalc. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 22% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| NuGet | ncalc.core | 6.1.1 | GHSA-3w5p-95mh-gq75 |
| NuGet | ncalcsync | 6.1.1 | GHSA-3w5p-95mh-gq75 |
Affected products (as reported)
Weakness: CWE-770, CWE-190 · Vector: CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
References
- https://github.com/ncalc/ncalc/security/advisories/GHSA-3w5p-95mh-gq75 x_refsource_CONFIRM
- https://github.com/ncalc/ncalc/pull/575 x_refsource_MISC
- https://github.com/ncalc/ncalc/commit/eeb6155ee1899b1fdf2cda3da35a4f0ca93ffd6a x_refsource_MISC
- https://github.com/ncalc/ncalc/releases/tag/v6.1.1 x_refsource_MISC