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

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.

Check my packages.lock.json

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.

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, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: NuGet (2).

PackageFixed 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.

  • 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. 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

CVSS Score
4.8

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.29%
EPSS percentile: 14.2

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

GHSA-3w5p-95mh-gq75

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my packages.lock.json