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

Medium 4.8 Published Updated

Attackers can cause denial of service in applications using NCalc by submitting crafted expressions that trigger excessive CPU consumption or infinite loops.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-55254?

CVE-2026-55254 is a medium-severity denial of service vulnerability in ncalc, published on 17 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

NCalc is a fast, lightweight expression evaluator for .NET. Prior to 6.1.1, the factorial operator implementation in src/NCalc.Core/Helpers/MathHelper.cs permits specially crafted expressions with extremely large factorial operands, causing excessive CPU consumption or a non-terminating loop due to integer overflow in the factorial calculation logic when applications evaluate untrusted expressions. This issue is fixed in version 6.1.1.

Weakness: CWE-770, CWE-190

Which versions are affected by CVE-2026-55254?

4 open source packages ship an affected version, including NCalc.Core and NCalcSync. It affects 1 product.

PackageAffectedFixed in
NCalc.Core NuGetAll versions6.1.1
NCalc.Core NuGetAll versions6.1.1
NCalcSync NuGetAll versions6.1.1
NCalcSync NuGetAll versions6.1.1

Products include Ncalc Ncalc.

How do I fix CVE-2026-55254?

Upgrade NCalc.Core to 6.1.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-55254 being exploited?

There is no known exploitation of CVE-2026-55254 in the wild and no public exploit code.

Sources

Also known as GHSA-3w5p-95mh-gq75.

Is CVE-2026-55254 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free