Memory Exhaustion in Expr Parser with Unrestricted InputGHSA-93mq-9ffx-83m2
HIGHFix: expr-lang/expr#762GHSA-93mq-9ffx-83m2 is a high-severity (CVSS 7.5) CWE-770 vulnerability in github.com/expr-lang/expr. A fix is available for github.com/expr-lang/expr — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-93mq-9ffx-83m2.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/expr-lang/exprReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
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.
Patches
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.
Workarounds
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, you 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
- #762
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/expr-lang/expr | all versions | 1.17.0go get github.com/expr-lang/expr@v1.17.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/expr-lang/expr, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/expr-lang/expr to 1.17.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-93mq-9ffx-83m2 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
To mitigate this vulnerability, it is recommended to impose an input size restriction before parsing (i.e. validating or limiting the length of expression strings that the application will accept). Ensuring no unbounded-length expressions are fed into the parser will prevent the parser from constructing a very large AST and avoid the potential memory exhaustion issue.Source: Red Hat security advisory for GHSA-93mq-9ffx-83m2 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 10 | opentelemetry-collector-0:0.107.0-9.el10_0 | RHSA-2025:7479 |
| Red Hat Enterprise Linux 9 | opentelemetry-collector-0:0.107.0-8.el9_5 | RHSA-2025:3335 |
| Red Hat Enterprise Linux 9 | opentelemetry-collector-0:0.107.0-8.el9_6 | RHSA-2025:7407 |
| Red Hat Enterprise Linux 9.4 Extended Update Support | opentelemetry-collector-0:0.107.0-7.el9_4 | RHSA-2025:3593 |
| Red Hat OpenShift GitOps 1.15 | openshift-gitops-1/argocd-extensions-rhel8:v1.15.2-4 | RHSA-2025:7753 |
| Custom Metric Autoscaler operator for Red Hat Openshift 2.15 | custom-metrics-autoscaler/custom-metrics-autoscaler-adapter-rhel9:2.15.1-1744845058 | RHSA-2025:3993 |
| Red Hat OpenShift distributed tracing 3.5.3 | rhosdt/tempo-rhel8:rhosdt-3.5-1744102053 | RHSA-2025:3740 |
| Red Hat OpenShift distributed tracing 3.5.3 | rhosdt/opentelemetry-collector-rhel8:rhosdt-3.5-1744103234 | RHSA-2025:3743 |
Frequently Asked Questions
Is GHSA-93mq-9ffx-83m2 in your dependencies?
Find it across Go, including transitive dependencies.