CVE-2026-142198: NCalc Uncontrolled Recursion
Published 2026-12-02 · Updated 2026-12-04 · Source disclosure@vulncheck.com
Not known to be exploited · high severity — update NCalc to 7.6.0 or later in your next patch cycle.
What to do
- Update NCalc to version 7.6.0 or later. Versions before 7.6.0 are affected.
- Until it is patched, do not leave NCalc reachable from the internet or other untrusted networks; restrict access by firewall, VPN or allow-list.
- Limit input size and nesting depth in front of the affected component.
Affected and fixed versions
| Product | Affected | Fixed in |
|---|---|---|
| NCalc | < 7.6.0 | 7.6.0 |
Derived by HackerFeeds from the advisory text, CVSS vector and weakness class. Confirm versions against the vendor advisory before acting.
How it can be exploited
It can be exploited remotely over the network; the attacker does not need an account, and no action by a victim is required. Attack complexity is low, so a working exploit is expected to be reliable. The impact on availability is rated high.
| Attack vector | Network | It can be exploited remotely over the network. |
|---|---|---|
| Attack complexity | Low | No special conditions are needed; the attack is repeatable. |
| Privileges required | None | The attacker does not need an account. |
| User interaction | None | No action by a victim is needed. |
| Confidentiality | None | No effect on confidentiality. |
| Integrity | None | No effect on integrity. |
| Availability | High | Total loss of availability. |
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness: Uncontrolled Recursion
Deeply nested input exhausts the stack and crashes the process.
Classified as CWE-674.
Description
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.
Advisory text as published in the NVD record.
References
- Patchhttps://github.com/ncalc/ncalc/commit/f1c03383ff87d7599b881713dd62fecaac1d4b8e
- Patchhttps://github.com/ncalc/ncalc/pull/657
- Patchhttps://github.com/ncalc/ncalc/releases/tag/v7.6.0
- Advisoryhttps://www.vulncheck.com/advisories/ncalc-before-7.6.0-uncontrolled-recursion-denial-of-service-via-evaluationvisitor
- Referencehttps://github.com/ncalc/ncalc/blob/v7.5.0/src/NCalc.Core/Visitors/EvaluationVisitor.cs#L69-L74