What’s Vulnerable › Vulnerabilities
CVE-2026-55254: NCalc: Denial of Service via Unbounded and Non-Terminating Factorial Evaluation
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-07-17 · updated 2026-08-18
- Weakness: CWE-190
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: before 6.1.1 — fixed in 6.1.1
How to fix
Upgrade to a fixed version: ncalc 6.1.1. Check the vendor advisory for mitigations.
References
- https://github.com/ncalc/ncalc/commit/eeb6155ee1899b1fdf2cda3da35a4f0ca93ffd6a
- https://github.com/ncalc/ncalc/pull/575
- https://github.com/ncalc/ncalc/releases/tag/v6.1.1
- https://github.com/ncalc/ncalc/security/advisories/GHSA-3w5p-95mh-gq75
Get alerted when CVE-2026-55254 or the next vulnerability affects your stack