CVE-2025-29786

7.5 HIGH

📋 TL;DR

CVE-2025-29786 is a denial-of-service vulnerability in the Expr expression language for Go where unbounded input strings can cause excessive memory consumption and process crashes. This affects applications using Expr versions before 1.17.0 that accept untrusted expression input without size limits. The vulnerability allows attackers to cause out-of-memory conditions by submitting extremely large expressions.

💻 Affected Systems

Products:
  • Expr expression language for Go
Versions: All versions before 1.17.0
Operating Systems: All platforms running Go applications using Expr
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when applications accept unbounded expression input without size restrictions. Typical bounded use cases are not affected.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption through out-of-memory crashes, potentially leading to extended downtime and data loss in affected processes.

🟠

Likely Case

Service degradation or temporary unavailability when malicious actors submit large expressions to vulnerable endpoints.

🟢

If Mitigated

Minimal impact with proper input validation or patched versions, where large expressions are rejected before parsing.

🌐 Internet-Facing: MEDIUM - Requires specific conditions (unbounded input acceptance) but could affect publicly accessible expression evaluation endpoints.
🏢 Internal Only: LOW - Internal systems typically have more controlled input sources, though risk exists if internal APIs accept arbitrary expressions.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires ability to submit expression input to vulnerable endpoints. No authentication bypass needed if endpoint is publicly accessible.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.17.0 and later

Vendor Advisory: https://github.com/expr-lang/expr/security/advisories/GHSA-93mq-9ffx-83m2

Restart Required: No

Instructions:

1. Update Expr dependency to version 1.17.0 or later. 2. Run 'go get github.com/expr-lang/expr@v1.17.0'. 3. Rebuild and redeploy affected applications.

🔧 Temporary Workarounds

Input size restriction

all

Implement maximum length validation for expression strings before parsing

// Example Go code: if len(expression) > MAX_EXPR_LENGTH { return error }

🧯 If You Can't Patch

  • Implement strict input validation to reject expressions exceeding reasonable length limits
  • Deploy rate limiting and input sanitization at API gateways or web application firewalls

🔍 How to Verify

Check if Vulnerable:

Check go.mod or go.sum for Expr dependency version below 1.17.0

Check Version:

grep 'expr-lang/expr' go.mod || grep 'github.com/expr-lang/expr' go.sum

Verify Fix Applied:

Confirm Expr version is 1.17.0+ in dependencies and test with large expression input

📡 Detection & Monitoring

Log Indicators:

  • Memory spike alerts
  • Process crash/restart logs
  • Unusually large input payloads in application logs

Network Indicators:

  • Large POST requests to expression evaluation endpoints
  • Repeated requests with increasing payload sizes

SIEM Query:

source="application.logs" AND ("out of memory" OR "OOM" OR "panic") AND "expr"

🔗 References

📤 Share & Export