Skip to main content
CVE-2025-29786VulnerabilityPublished Updated

CVE-2025-29786: expr · Unthrottled Resource Allocation

Affects exprSource CVE Database V5

0

Not known to be exploited · CVSS 7.5 High : upgrade to 1.17.0 soon.

Data as of 26 Oct 2026, 06:26 UTC

CVSS 3.1 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.6% chance of exploitation in 30 days – higher than 49% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 1.17.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 17 Mar 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.

What to do

Upgrade github.com/expr-lang/expr to 1.17.0.

Affected software

ProductAffectedFixed in
Gogithub.com/expr-lang/exprpkg:golang/github.com/expr-lang/exprOther threatsAffected
  • <1.17.0
Fixed in
  • 1.17.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

1. Upgrade all instances of the expr-lang library to version 1.17.0 or later, which includes built-in compile-time limits on AST nodes and memory usage to prevent resource exhaustion. 2. For environments where immediate upgrading is not feasible, implement strict input validation to limit the size and complexity of expressions accepted by the parser. This includes setting maximum allowable character lengths and rejecting or truncating inputs exceeding these thresholds. 3. Employ runtime monitoring and alerting on memory usage patterns in services utilizing expr to detect abnormal spikes indicative of attempted exploitation. 4. Use application-layer firewalls or API gateways to enforce input size restrictions and block suspiciously large or malformed expression payloads. 5. Conduct code reviews and penetration testing focused on expression evaluation components to identify and remediate any unbounded input handling. 6. Document and communicate the vulnerability and mitigation steps to development and operations teams to ensure consistent application of safeguards. 7. Consider implementing circuit breakers or resource quotas in container orchestration platforms to limit the impact of potential OOM conditions. These steps collectively reduce the risk of denial-of-service attacks exploiting this vulnerability.

Description

Expr is an expression language and expression evaluation for Go. Prior to version 1.17.0, if the Expr expression parser is given an unbounded input string, it will attempt to compile the entire string and generate an Abstract Syntax Tree (AST) node for each part of the expression. In scenarios where input size isn’t limited, a malicious or inadvertent extremely large expression can consume excessive memory as the parser builds a huge AST. This can ultimately lead to*excessive memory usage and an Out-Of-Memory (OOM) crash of the process. This issue is relatively uncommon and will only manifest when there are no restrictions on the input size, i.e.the expression length is allowed to grow arbitrarily large. In typical use cases where inputs are bounded or validated, this problem would not occur. The problem has been patched in the latest versions of the Expr library. The fix introduces compile-time limits on the number of AST nodes and memory usage during parsing, preventing any single expression from exhausting resources. Users should upgrade to Expr version 1.17.0 or later, as this release includes the new node budget and memory limit safeguards. Upgrading to v1.17.0 ensures that extremely deep or large expressions are detected and safely aborted during compilation, avoiding the OOM condition. For users who cannot immediately upgrade, the recommended workaround is to impose an input size restriction before parsing. In practice, this means validating or limiting the length of expression strings that your application will accept. For example, set a maximum allowable number of characters (or nodes) for any expression and reject or truncate inputs that exceed this limit. By ensuring no unbounded-length expression is ever fed into the parser, one can prevent the parser from constructing a pathologically large AST and avoid potential memory exhaustion. In short, pre-validate and cap input size as a safeguard in the absence of the patch.

References

Community reviews

Loading reviews…