# CVE-2026-142198: NCalc before 7.6.0 Uncontrolled Recursion Denial of Service via EvaluationVisitor

Source: https://aplosec.si/cve/CVE-2026-142198/

[AploSec](https://aplosec.si/) / [Disclosures](https://aplosec.si/disclosures/) / CVE-2026-142198

High 8.7 · Reported · Fixed in 7.6.0 · CWE-674 · NuGet

# NCalc before 7.6.0 Uncontrolled Recursion Denial of Service via EvaluationVisitor

CVE-2026-142198 · published 2026-12-02

In plain words: this type of bug lets someone slow down or crash the service with crafted input (denial of service). A fixed release is listed.

## Summary

CVE-2026-142198 affects NCalc (NuGet) < 7.6.0: Uncontrolled Recursion Denial of Service via EvaluationVisitor (CWE-674). Fixed in 7.6.0. CVSS 4.0 base score 8.7 (High), assigned by VulnCheck. Published 2026-12-02 by VulnCheck. Credit: Zachariah Mithani (AploSec).

NCalc before 7.6.0 contains an uncontrolled recursion vulnerability that allows attackers to crash the host process by supplying long flat chains of operators. Attackers can submit an expression of a few thousand chained unary negation, factorial, or addition terms that recursively exhausts the thread stack in EvaluationVisitor, triggering an uncatchable StackOverflowException that terminates the application.

## Evidence

Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.

## Remediation

Upgrade NCalc to 7.6.0 or later. Releases in the affected range (< 7.6.0) are vulnerable. See the linked advisory for details on affected release lines.

## Timeline

- 2026-12-02 CVE published

## References

- [VulnCheck advisoryhttps://www.vulncheck.com/advisories/ncalc-before-7.6.0-uncontrolled-recursion-denial-of-service-via-evaluationvisitor](https://www.vulncheck.com/advisories/ncalc-before-7.6.0-uncontrolled-recursion-denial-of-service-via-evaluationvisitor)

- [Fix pull requesthttps://github.com/ncalc/ncalc/pull/657](https://github.com/ncalc/ncalc/pull/657)

- [Vulnerable codehttps://github.com/ncalc/ncalc/blob/v7.5.0/src/NCalc.Core/Visitors/EvaluationVisitor.cs#L69-L74](https://github.com/ncalc/ncalc/blob/v7.5.0/src/NCalc.Core/Visitors/EvaluationVisitor.cs#L69-L74)

- [Fix commithttps://github.com/ncalc/ncalc/commit/f1c03383ff87d7599b881713dd62fecaac1d4b8e](https://github.com/ncalc/ncalc/commit/f1c03383ff87d7599b881713dd62fecaac1d4b8e)

- [Releasehttps://github.com/ncalc/ncalc/releases/tag/v7.6.0](https://github.com/ncalc/ncalc/releases/tag/v7.6.0)

- [CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-142198](https://www.cve.org/CVERecord?id=CVE-2026-142198)

- [NVD recordhttps://nvd.nist.gov/vuln/detail/CVE-2026-142198](https://nvd.nist.gov/vuln/detail/CVE-2026-142198)

**Severity:** High 8.7 CVSS 4.0, scored by VulnCheck in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-142198)

**Package:** NCalc

**Ecosystem:** NuGet

**Affected:** < 7.6.0

**Fixed:** 7.6.0

**Weakness:** CWE-674

**CNA:** VulnCheck

**Credit:** Zachariah Mithani (AploSec) finder
