CVE-2026-55254 is a medium-severity (CVSS 4.8) CWE-190 vulnerability in NCalc.Core. A fix is available for NCalc.Core — see the affected versions and patch details below.
NCalc: Denial of Service via Unbounded and Non-Terminating Factorial Evaluation
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-55254.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2026-55254 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 397,508 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
NCalc.Core.NETNCalcSyncReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects NuGet packages — download data is not available via public APIs for these ecosystems.
Description
Impact
A denial-of-service (DoS) vulnerability exists in the factorial operator implementation of NCalc. Specially crafted expressions containing extremely large factorial operands can trigger excessive CPU consumption or cause evaluation to enter a non-terminating loop due to integer overflow in the factorial calculation logic.
Applications that evaluate untrusted expressions using affected versions of NCalc may be vulnerable to resource exhaustion, potentially resulting in service disruption or application unresponsiveness.
This issue can be triggered with expressions such as:
99999999999999!
9223372036854775807!
1.5e16!
Patches
The vulnerability has been fixed by adding bounds validation for factorial operands and rejecting unsupported values before evaluation.
Users should upgrade to the first release containing the fix from pull request #575. (v6.1.1+)
Workarounds
If upgrading is not immediately possible:
- Do not evaluate expressions originating from untrusted users.
- Validate or sanitize expressions before evaluation and reject factorial operations on large values.
- Implement execution time limits, request timeouts, or cancellation mechanisms around expression evaluation.
These mitigations may reduce exposure but do not fully address the underlying vulnerability.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| .NETNuGet | NCalc.Core | all versions | 6.1.1dotnet add package NCalc.Core --version 6.1.1 |
| .NETNuGet | NCalcSync | all versions | 6.1.1dotnet add package NCalcSync --version 6.1.1 |
Affected Products
ncalcncalcDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for NCalc.Core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update NCalc.Core to 6.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-55254 is resolved across your whole dependency graph.
Workarounds
Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.
Frequently Asked Questions
Is CVE-2026-55254 in your dependencies?
Find it across NuGet, including transitive dependencies.