CVE-2026-55254 — Vulnerability in NCalcSync — CVE Details
NCalc: Denial of Service via Unbounded and Non-Terminating Factorial Evaluation
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.29%). Schedule for your next planned update.
Does your project use an affected NCalcSync version?
Paste your packages.lock.json to check it for CVE-2026-55254 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published June 18, 2026 (161 days ago).
- Last revised June 18, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
dotnet add package NCalcSync --version 6.1.1
dotnet add package NCalc.Core --version 6.1.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: NuGet (2).
| Package | Fixed In |
|---|---|
| NCalcSync NuGet · Affected: 2.0.0, 3.0.0, 3.1.0, 3.10.0 (+52 more) | 6.1.1 |
| NCalc.Core NuGet · Affected: 4.3.0, 4.3.1, 4.3.2, 4.3.3 (+32 more) | 6.1.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 4.8 score means for each attack dimension.
CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
References
Frequently Asked Questions
- What is CVE-2026-55254?
- NCalc: Denial of Service via Unbounded and Non-Terminating Factorial Evaluation. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 4.8/10).
- How do I check if my project is affected by CVE-2026-55254?
- CVE-2026-55254 affects NCalcSync and NCalc.Core. It has a 0.3% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-55254 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 14.2% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-114154MEDIUM
Microsoft Security Advisory CVE-2026-114154 - ASP.NET Core Denial of Service Vulnerability
- GHSA-6856-87hx-p5x7MEDIUM
Microsoft Security Advisory CVE-2026-105544 - .NET Elevation of Privilege Vulnerability