CVE-2025-29786
Memory Exhaustion in Expr Parser with Unrestricted Input
Also known as GHSA-93mq-9ffx-83m2, GO-2025-3525
Mitigation
- Upgrade github.com/expr-lang/expr to 1.17.0 or later.
Who should check
- Projects that depend on Go package github.com/expr-lang/expr (< 1.17.0)
- Anyone running expr-lang expr < 1.17.0
Vulnerability facts
- Affected
- github.com/expr-lang/expr < 1.17.0
- Fixed in
- 1.17.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 7.5 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- EPSS
- 1.04% chance of exploitation in 30 days (percentile 63, 2026-11-26)
- CWE
- CWE-770
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/expr-lang/expr | < 1.17.0 | 1.17.0 | osv |
| expr-lang expr | < 1.17.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-29786. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-29786.md Affected: github.com/expr-lang/expr < 1.17.0 Fixed in: 1.17.0 Steps: 1. Search this machine and project for github.com/expr-lang/expr (Go), expr-lang expr: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
FAQ
Is CVE-2025-29786 being exploited?
There is no confirmed exploitation: CVE-2025-29786 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.04% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-29786?
High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2025-29786?
github.com/expr-lang/expr < 1.17.0.
Is there a fix for CVE-2025-29786?
Yes. Fixed in 1.17.0. Upgrade github.com/expr-lang/expr to 1.17.0 or later.
How do I check if I'm affected by CVE-2025-29786?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.