CVE-2026-55254
Published:June 18, 2026
Updated:June 25, 2026
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
NCalc.Core (DOT_NET):
Affected version(s) >=4.3.0.13 <6.1.1Fix Suggestion:
Update to version 6.1.1NCalcSync (DOT_NET):
Affected version(s) >=4.3.0.13 <6.1.1Fix Suggestion:
Update to version 6.1.1https://github.com/ncalc/ncalc.git (GITHUB):
Affected version(s) >=v4.3.0 <v6.1.1Fix Suggestion:
Update to version v6.1.1ncalcsync (NUGET):
Affected version(s) >=2.0.0 <6.1.1Fix Suggestion:
Update to version 6.1.1ncalc.core (NUGET):
Affected version(s) >=4.3.0 <6.1.1Fix Suggestion:
Update to version 6.1.1Related Resources (3)
Do you need more information?
Contact UsCVSS v4
Base Score:
5.9
Attack Vector
ADJACENT
Attack Complexity
HIGH
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
PASSIVE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
NONE
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
4.8
Attack Vector
ADJACENT
Attack Complexity
HIGH
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH