Loading...
Skip to main content

CVE-2026-55254 — Vulnerability in NCalcSync — CVE Details

MEDIUM

NCalc: Denial of Service via Unbounded and Non-Terminating Factorial Evaluation

Published June 18, 2026Updated June 18, 2026Source: osv

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: ```text 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 (116 days ago).
  • Last revised June 18, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update NCalcSync to 6.1.1 or later
dotnet add package NCalcSync --version 6.1.1
NuGet
Update NCalc.Core to 6.1.1 or later
dotnet add package NCalc.Core --version 6.1.1

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: nuget (2).

PackageEcosystemAffectedFixed In
NCalcSync
nuget
2.0.0, 3.0.0, 3.1.0, 3.10.0 (+52 more)6.1.1
NCalc.Core
nuget
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.

  • CWE-190
    Integer OverflowMITRE
  • CWE-770
    Allocation of Resources Without LimitsMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 4.8 score means for each attack dimension.

Attack Vector
Adjacent
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H

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. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-55254 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
4.8

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-3w5p-95mh-gq75

Related CVEs

  • CVE-2026-106111
    MEDIUM

    ImageSharp: EXR ZIP decoder can expose stale allocator data after a short inflate

  • CVE-2026-65829
    MEDIUM

    MPXJ: Potential Path Traversal Vulnerability in Primavera P3 PRX and SureTrak STX readers

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies