CVE-2025-68156

7.5 HIGH

📋 TL;DR

This vulnerability in Expr for Go allows denial-of-service attacks through stack overflow panics. Attackers can crash applications by providing deeply nested or cyclic data structures to certain builtin functions. It affects applications using Expr versions before 1.17.7 to evaluate expressions against untrusted data.

💻 Affected Systems

Products:
  • Expr (Go expression language library)
Versions: All versions before 1.17.7
Operating Systems: All platforms running Go applications
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications that use the vulnerable builtin functions (flatten, min, max, mean, median) with untrusted data structures.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete application crash and denial of service, potentially affecting multiple users or services.

🟠

Likely Case

Application crashes when processing maliciously crafted input, causing service disruption.

🟢

If Mitigated

Graceful error handling with descriptive error messages instead of crashes.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires ability to influence evaluation environment data, but no authentication needed if input vectors exist.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.17.7

Vendor Advisory: https://github.com/expr-lang/expr/security/advisories/GHSA-cfpf-hrx2-8rv6

Restart Required: Yes

Instructions:

Update go.mod to require expr v1.17.7 or later
Run 'go get github.com/expr-lang/expr@v1.17.7'
Rebuild and redeploy application

🔧 Temporary Workarounds

Input validation and sanitization

all

Validate or sanitize externally supplied data structures before passing to Expr

Panic recovery wrapper

all

Wrap expression evaluation with panic recovery to prevent full process crash

🧯 If You Can't Patch

  • Ensure evaluation environments cannot contain cyclic references
  • Implement strict input validation for all data passed to Expr functions

🔍 How to Verify

Check if Vulnerable:

Check go.mod or go.sum for expr versions before 1.17.7

Check Version:

grep 'expr-lang/expr' go.mod

Verify Fix Applied:

Verify expr version is 1.17.7 or later in go.mod

📡 Detection & Monitoring

Log Indicators:

  • Stack overflow panic messages
  • Application crash logs mentioning Expr functions
  • Unexpected process termination

Network Indicators:

  • Sudden service unavailability
  • Increased error rates in API responses

SIEM Query:

process:terminated AND (message:*panic* OR message:*stack*overflow*) AND source:expr

🔗 References

📤 Share & Export