CVE-2025-68156: CWE-770: Allocation of Resources Without Limits or Throttling in expr-lang expr
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.
AI Analysis
Technical Summary
CVE-2025-68156 is a vulnerability in the expr-lang Go library, specifically in versions before 1.17.7, where several builtin functions (flatten, min, max, mean, median) perform recursive traversal over user-provided data structures without enforcing a maximum recursion depth. This lack of limits allows an attacker to supply deeply nested or cyclic data structures that cause the recursive functions to recurse indefinitely until the Go runtime stack limit is exceeded, resulting in a stack overflow panic and crashing the host application. The vulnerability represents a denial-of-service (DoS) risk because the process terminates unexpectedly rather than returning a recoverable error. Exploitability depends on the ability of an attacker to influence or inject cyclic or pathologically deep data into the evaluation environment, which is common in scenarios where expr-lang evaluates expressions against externally supplied or dynamically constructed data. The issue is mitigated in version 1.17.7 by introducing a maximum recursion depth limit for affected functions, which aborts evaluation gracefully with a descriptive error when exceeded. This limit is customizable via the builtin.MaxDepth parameter, allowing legitimate deep structures to be handled safely. For users unable to upgrade immediately, recommended mitigations include preventing cyclic references in evaluation environments, validating or sanitizing external data before evaluation, and wrapping expression evaluation with panic recovery to avoid full process crashes. The vulnerability has a CVSS 3.1 score of 7.5 (high severity), reflecting its network attack vector, low attack complexity, no privileges or user interaction required, and impact limited to availability (denial of service). No known exploits are reported in the wild yet.
Potential Impact
For European organizations, this vulnerability poses a significant risk of denial-of-service attacks against applications using vulnerable versions of expr-lang to evaluate expressions on untrusted or dynamically constructed data. Critical services relying on expr-lang for configuration, policy evaluation, or data processing could be disrupted by crafted inputs causing application crashes. This can lead to service downtime, loss of availability, and potential cascading effects on dependent systems. Organizations in sectors such as finance, telecommunications, government, and critical infrastructure that utilize Go-based microservices or automation tools incorporating expr-lang are particularly vulnerable. The lack of authentication or user interaction requirements means remote attackers can exploit this vulnerability over the network if the application exposes expression evaluation functionality. While the vulnerability does not affect confidentiality or integrity directly, the availability impact can degrade operational continuity and erode trust in affected services. Additionally, denial-of-service conditions could be leveraged as part of multi-stage attacks or to distract from other malicious activities.
Mitigation Recommendations
The primary mitigation is to upgrade all instances of expr-lang to version 1.17.7 or later, which includes a recursion depth limit and graceful error handling to prevent stack overflow panics. Organizations should audit their codebases and dependencies to identify usage of vulnerable expr-lang versions. For environments where immediate upgrade is not feasible, implement input validation and sanitization to detect and reject cyclic or excessively deep data structures before evaluation. Developers should enforce application-level safeguards to prevent injection of maliciously crafted data into the evaluation environment. Additionally, wrapping expression evaluation calls with panic recovery mechanisms can prevent full process crashes, allowing the application to handle errors more gracefully. Monitoring and logging expression evaluation failures can help detect attempted exploitation. Security teams should also review network exposure of services using expr-lang to limit attacker access. Incorporating these mitigations reduces risk until patching can be completed.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Ireland, Belgium
CVE-2025-68156: CWE-770: Allocation of Resources Without Limits or Throttling in expr-lang expr
Description
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-68156 is a vulnerability in the expr-lang Go library, specifically in versions before 1.17.7, where several builtin functions (flatten, min, max, mean, median) perform recursive traversal over user-provided data structures without enforcing a maximum recursion depth. This lack of limits allows an attacker to supply deeply nested or cyclic data structures that cause the recursive functions to recurse indefinitely until the Go runtime stack limit is exceeded, resulting in a stack overflow panic and crashing the host application. The vulnerability represents a denial-of-service (DoS) risk because the process terminates unexpectedly rather than returning a recoverable error. Exploitability depends on the ability of an attacker to influence or inject cyclic or pathologically deep data into the evaluation environment, which is common in scenarios where expr-lang evaluates expressions against externally supplied or dynamically constructed data. The issue is mitigated in version 1.17.7 by introducing a maximum recursion depth limit for affected functions, which aborts evaluation gracefully with a descriptive error when exceeded. This limit is customizable via the builtin.MaxDepth parameter, allowing legitimate deep structures to be handled safely. For users unable to upgrade immediately, recommended mitigations include preventing cyclic references in evaluation environments, validating or sanitizing external data before evaluation, and wrapping expression evaluation with panic recovery to avoid full process crashes. The vulnerability has a CVSS 3.1 score of 7.5 (high severity), reflecting its network attack vector, low attack complexity, no privileges or user interaction required, and impact limited to availability (denial of service). No known exploits are reported in the wild yet.
Potential Impact
For European organizations, this vulnerability poses a significant risk of denial-of-service attacks against applications using vulnerable versions of expr-lang to evaluate expressions on untrusted or dynamically constructed data. Critical services relying on expr-lang for configuration, policy evaluation, or data processing could be disrupted by crafted inputs causing application crashes. This can lead to service downtime, loss of availability, and potential cascading effects on dependent systems. Organizations in sectors such as finance, telecommunications, government, and critical infrastructure that utilize Go-based microservices or automation tools incorporating expr-lang are particularly vulnerable. The lack of authentication or user interaction requirements means remote attackers can exploit this vulnerability over the network if the application exposes expression evaluation functionality. While the vulnerability does not affect confidentiality or integrity directly, the availability impact can degrade operational continuity and erode trust in affected services. Additionally, denial-of-service conditions could be leveraged as part of multi-stage attacks or to distract from other malicious activities.
Mitigation Recommendations
The primary mitigation is to upgrade all instances of expr-lang to version 1.17.7 or later, which includes a recursion depth limit and graceful error handling to prevent stack overflow panics. Organizations should audit their codebases and dependencies to identify usage of vulnerable expr-lang versions. For environments where immediate upgrade is not feasible, implement input validation and sanitization to detect and reject cyclic or excessively deep data structures before evaluation. Developers should enforce application-level safeguards to prevent injection of maliciously crafted data into the evaluation environment. Additionally, wrapping expression evaluation calls with panic recovery mechanisms can prevent full process crashes, allowing the application to handle errors more gracefully. Monitoring and logging expression evaluation failures can help detect attempted exploitation. Security teams should also review network exposure of services using expr-lang to limit attacker access. Incorporating these mitigations reduces risk until patching can be completed.
Affected Countries
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-12-15T23:02:17.604Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6941ae5b0d5f6f4391b0c394
Added to database: 12/16/2025, 7:09:15 PM
Last enriched: 12/23/2025, 7:33:08 PM
Last updated: 2/7/2026, 10:15:58 PM
Views: 95
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-2114: SQL Injection in itsourcecode Society Management System
MediumCVE-2026-25858: CWE-640 Weak Password Recovery Mechanism for Forgotten Password in macrozheng mall
CriticalCVE-2026-25857: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Shenzhen Tenda Technology Tenda G300-F
HighCVE-2025-15564: Divide By Zero in Mapnik
MediumCVE-2026-2113: Deserialization in yuan1994 tpadmin
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.