Expr (Go)
CVE-2025-68156
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInject cyclic/deep data into Expr environment
-
DeliverySubmit expression using flatten/min/max/mean/median builtin
-
ExploitTrigger unbounded recursive traversal
-
ExecutionExhaust Go runtime stack
-
ImpactProcess-level panic crashes host application
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the Expr evaluation environment be populated from externally supplied or dynamically constructed data AND that an attacker can introduce a cyclic reference (directly or indirectly, in an array, map, or struct) or a pathologically deeply nested structure, AND that the evaluated expression invokes one of the affected builtins (flatten, min, max, mean, or median). Limiting factors that reduce realistic risk: deployments using only controlled, acyclic, bounded data will not manifest the crash; applications can mitigate without upgrading by sanitizing/validating input structures, forbidding cyclic references, or wrapping evaluation in panic recovery; and the post-patch default guard (builtin.MaxDepth=10000) converts the panic into a recoverable error. The flaw affects all pre-1.17.7 versions of github.com/expr-lang/expr. |
| Impact | This is a genuine but conditional denial-of-service issue rather than a top-priority emergency. The input CVSS v3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H = 7.5 HIGH) weights it as remotely reachable with low complexity and no privileges, but the description and GHSA advisory explicitly condition exploitability on whether an attacker can inject cyclic or pathologically deep data structures into the Expr evaluation environment - a prerequisite the CVSS AC:L metric does not capture. This is a notable conflict: the published AC:L is optimistic, and in practice exploitation complexity is higher (hence my independent assessment uses AC:H). Corroborating lower-urgency signals: EPSS is only 0.42% (35th percentile), there is no CISA KEV listing, and no public exploit was identified at time of analysis (the GitHub diff contains regression tests, not a weaponized PoC). Impact is confined to availability (C:N/I:N/A:H via CWE-770 uncontrolled resource consumption / unbounded recursion → stack-overflow panic); there is no code execution or data exposure. Net: a real robustness/DoS defect worth patching, especially for services that evaluate Expr expressions against untrusted externally-supplied environments, but it is not a high-real-risk, widely-exploited flaw and should be prioritized below RCE/KEV items. |
| Exploit ScenarioDerived | An application embeds the Expr library and evaluates expressions (using builtins like flatten, min, max, mean, or median) against a data environment that is populated from externally supplied input. An attacker submits input that produces a cyclic reference (e.g., a slice containing a pointer to itself) or an extremely deeply nested structure, so that calling the builtin triggers unbounded recursion and a Go stack-overflow panic. No public weaponized exploit was identified; however, the patch's test suite demonstrates the crash is trivially reproducible once attacker-controlled cyclic/deep data reaches the evaluator. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 13, 2026
Stack-exhaustion denial of service in the Expr expression language for Go (github.com/expr-lang/expr, all versions before 1.17.7) lets remote, unauthenticated attackers crash a host application by having it evaluate the builtin functions flatten, min, max, mean, or median against data structures that contain cyclic references or pathologically deep nesting. The affected builtins perform recursive traversal without any depth limit, so the Go runtime stack is exhausted and the process terminates with an unrecoverable panic instead of returning an evaluation error. Exploitation is conditional rather than automatic: the attacker must be able to influence the evaluation environment's data (not merely the expression text), which our independent assessment reflects by raising attack complexity to High relative to NVD's AC:L; the CISA KEV catalog contains no entry for this CVE, no public exploit code was identified at time of analysis, and EPSS is low at 0.42% (35th percentile), so this is a genuine but limited denial-of-service issue rather than a top-priority emergency. The vendor has released a patch in v1.17.7.
RemediationAI
Upgrade the Expr dependency to the patched release github.com/expr-lang/expr v1.17.7 (Vendor-released patch: 1.17.7), which adds the recursion guard and converts the crash into a recoverable builtin.ErrorMaxDepth evaluation error; the fix is delivered via PR #870 and documented in GHSA-cfpf-hrx2-8rv6. After upgrading, applications with legitimate deeply nested data can raise the guard deliberately by setting builtin.MaxDepth above its default of 10000, but note the trade-off that a very high limit restores the stack-exhaustion exposure, so set it only as high as your real data depth and ideally below the Go goroutine stack threshold. For users who cannot upgrade immediately, the vendor recommends ensuring evaluation environments cannot contain cyclic references (reject or strip self-referential slices/maps/structs during construction), validating or sanitizing externally supplied data structures to cap nesting depth before they are passed to Expr, and wrapping evaluation in a panic-recovery defer as a last-resort defense; be aware these are compensating controls only, panic recovery is fragile against fatal runtime stack overflow in some Go versions and does not address the root cause, and input sanitization has the side effect of rejecting legitimate deep or self-referential data, so patching remains the recommended fix.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in go
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Expr is an embeddable expression-evaluation language and interpreter for Go, commonly used to run user- or configuration-supplied expressions against a runtime environment of maps, slices, and structs. The root cause class is CWE-770 (Allocation of Resources Without Limits or Throttling): the builtin helpers minMax (backing min and max), mean, median, and flatten walk nested slices/arrays recursively, and prior to 1.17.7 that recursion had no depth counter, so a self-referential slice, a pointer embedded in itself, or an attacker-crafted deeply nested structure causes unbounded recursion that overruns the goroutine stack and triggers a fatal Go stack-overflow panic that cannot be recovered by the calling code. The upstream fix (PR #870, tracked by GHSA-cfpf-hrx2-8rv6) threads a depth parameter through minMax, mean, median, and flatten, introduces a package-level guard builtin.MaxDepth (default 10000) and a sentinel error builtin.ErrorMaxDepth, and returns that error gracefully when the limit is exceeded; the commit also adds regression tests covering self-referential slices, cyclic pointer slices, the four numeric builtins, and a configurable MaxDepth. The affected component is the Go module only, as reflected by CPE cpe:2.3:a:expr-lang:expr:*:*:*:*:*:go:*:*, meaning any application embedding a pre-1.17.7 version of the library inherits the flaw.
Know when Expr gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Network-reachable with no auth, but exploitation depends on attacker injecting cyclic/deeply-nested data into the evaluator so AC:H; availability-only impact (crash), no confidentiality or integrity effect.
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
Expr is an expression language and expression evaluation for Go. Prior to version 1.17.7, several builtin functions in Expr, including flatten, min, max, mean, and median, perform recursive traversal over user-provided data structures without enforcing a maximum recursion depth. If the evaluation environment contains deeply nested or cyclic data structures, these functions may recurse indefinitely until exceed the Go runtime stack limit. This results in a stack overflow panic, causing the host application to crash. While exploitability depends on whether an attacker can influence or inject cyclic or pathologically deep data into the evaluation environment, this behavior represents a denial-of-service (DoS) risk and affects overall library robustness. Instead of returning a recoverable evaluation error, the process may terminate unexpectedly. In affected versions, evaluation of expressions that invoke certain builtin functions on untrusted or insufficiently validated data structures can lead to a process-level crash due to stack exhaustion. This issue is most relevant in scenarios where Expr is used to evaluate expressions against externally supplied or dynamically constructed environments; cyclic references (directly or indirectly) can be introduced into arrays, maps, or structs; and there are no application-level safeguards preventing deeply nested input data. In typical use cases with controlled, acyclic data, the issue may not manifest. However, when present, the resulting panic can be used to reliably crash the application, constituting a denial of service. The issue has been fixed in the v1.17.7 versions of Expr. The patch introduces a maximum recursion depth limit for affected builtin functions. When this limit is exceeded, evaluation aborts gracefully and returns a descriptive error instead of panicking. Additionally, the maximum depth can be customized by users via builtin.MaxDepth, allowing applications with legitimate deep structures to raise the limit in a controlled manner. Users are strongly encouraged to upgrade to the patched release, which includes both the recursion guard and comprehensive test coverage to prevent regressions. For users who cannot immediately upgrade, some mitigations are recommended. Ensure that evaluation environments cannot contain cyclic references, validate or sanitize externally supplied data structures before passing them to Expr, and/or wrap expression evaluation with panic recovery to prevent a full process crash (as a last-resort defensive measure). These workarounds reduce risk but do not fully eliminate the issue without the patch.
Executive ViewAI
Expr, a Go expression-language library, has a high-severity denial-of-service flaw that can crash the host application when specific built-in functions process malicious or malformed data. Organizations using affected versions prior to 1.17.7 face potential service outages, though exploitation is conditional and no public exploit identified at time of analysis. A vendor patch is available, so leadership should prioritize identifying and upgrading affected Go services to reduce availability risk.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
NVD
CVE.org
EPSS
GitHub
Exploit-DB