NCalc.Core
Affected
- introduced
0, fixed6.1.1(ecosystem)
Fixed versions
6.1.1
Fix
The export has no generic command for this ecosystem.
Advisory
Also known as: CVE-2026-55254
NCalc: Denial of Service via Unbounded and Non-Terminating Factorial Evaluation
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:
These mitigations may reduce exposure but do not fully address the underlying vulnerability.
Medium Basis: The source's own band: MODERATE
0, fixed 6.1.1 (ecosystem)6.1.1
The export has no generic command for this ecosystem.
0, fixed 6.1.1 (ecosystem)6.1.1
The export has no generic command for this ecosystem.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0