Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Dec 16, 2025

This PR contains the following updates:

Package Change Age Confidence
github.com/expr-lang/expr v1.17.6v1.17.7 age confidence

GitHub Vulnerability Alerts

CVE-2025-68156

Several builtin functions in Expr, including flatten, min, max, mean, and median, perform
recursive traversal over user-provided data structures without enforcing a maximum recursion depth.

If the evaluation environment contains deeply nested or cyclic data structures, these functions may recurse
indefinitely until exceed the Go runtime stack limit. This results in a stack overflow panic, causing the host
application to crash.

While exploitability depends on whether an attacker can influence or inject cyclic or pathologically deep data into the
evaluation environment, this behavior represents a denial-of-service (DoS) risk and affects overall library robustness.
Instead of returning a recoverable evaluation error, the process may terminate unexpectedly.

Impact

In affected versions, evaluation of expressions that invoke certain builtin functions on untrusted or insufficiently
validated data structures can lead to a process-level crash due to stack exhaustion.

This issue is most relevant in scenarios where:

  • Expr is used to evaluate expressions against externally supplied or dynamically constructed environments.
  • Cyclic references (directly or indirectly) can be introduced into arrays, maps, or structs.
  • There are no application-level safeguards preventing deeply nested input data.

In typical use cases with controlled, acyclic data, the issue may not manifest. However, when present, the resulting
panic can be used to reliably crash the application, constituting a denial of service.

Patches

The issue has been fixed in the v1.17.7 versions of Expr.

The patch introduces a maximum recursion depth limit for affected builtin functions. When this limit is exceeded,
evaluation aborts gracefully and returns a descriptive error instead of panicking.

Additionally, the maximum depth can be customized by users via builtin.MaxDepth, allowing applications with legitimate
deep structures to raise the limit in a controlled manner.

Users are strongly encouraged to upgrade to the patched release, which includes both the recursion guard and
comprehensive test coverage to prevent regressions.

Workarounds

For users who cannot immediately upgrade, the following mitigations are recommended:

  • Ensure that evaluation environments cannot contain cyclic references.
  • Validate or sanitize externally supplied data structures before passing them to Expr.
  • Wrap expression evaluation with panic recovery to prevent a full process crash (as a last-resort defensive measure).

These workarounds reduce risk but do not fully eliminate the issue without the patch.


Release Notes

expr-lang/expr (github.com/expr-lang/expr)

v1.17.7

Compare Source

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.

program, err := expr.Compile(`let foo = bar(); baz(foo, foo)`)

This release brings new language features, performance improvements across runtime and compiler, better error
handling, and many important bug fixes.

New Features

Support for else if expressions
  • You can now chain conditional branches using else if! (#​879)
Unicode escapes in the \u{XXXXXX} format
  • String literals now support Unicode code point escapes such as \u{1F600}. (#​882)
Byte slice support in the matches operator

The matches operator now works with []byte, improving interoperability with binary data. (#​876)

Short-circuit control options

New options allow enabling or disabling short-circuiting behavior in the compiler and VM. (#​847)

Option to disable if operator

A separate DisableIfOperator option is now available. (#​881)

Performance Improvements

Runtime structure fetch improvements

Accessing struct fields at runtime is now faster. (#​833)

VM function call optimizations

Function calls inside the VM execute more efficiently. (#​832)

Type system performance boost

Large or complex type operations now run significantly faster. (#​824)

Bug Fixes

  • Guard negative forward jump offsets (#​861).
  • Prevent stack underflow in the VM (#​860).
  • Correct behavior of AsBool with nil and undefined variables (#​866).
  • Proper handling of nil arguments in variadic functions (#​868).
  • Show function name for safe calls in disassembly (#​869).
  • Limit recursion depth in built-in functions (#​870).
  • Throw an error when a predicate is missing in the parser (#​842).
  • Fixed array type resolution in conditional operator (#​865).
  • Disallow access to unexported struct fields (#​846).
  • Fixed retrieving field pointers in structs (#​843).
  • Better error position reporting in multi-line scripts (#​827).
  • Support quoting backticks inside string literals (#​820).
  • Fixed auto-dereference for maps/slices and conditionals (#​871).
  • Wrap merged optimizer results as predicates (#​864).
  • Improved missing property handling (#​854).
  • Handle invalid if conditions and detect null-byte crashes.
  • Added regression tests for several reported issues.

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Indicates a change to dependencies label Dec 16, 2025
@renovate renovate bot requested a review from a team as a code owner December 16, 2025 22:37
@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.16%. Comparing base (fbe4720) to head (b62db57).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1379   +/-   ##
=======================================
  Coverage   58.16%   58.16%           
=======================================
  Files         646      646           
  Lines       24931    24931           
=======================================
  Hits        14500    14500           
  Misses       9767     9767           
  Partials      664      664           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@renovate renovate bot force-pushed the renovate/go-github.com-expr-lang-expr-vulnerability branch from b716858 to e83d915 Compare December 30, 2025 16:27
@renovate renovate bot force-pushed the renovate/go-github.com-expr-lang-expr-vulnerability branch from e83d915 to b62db57 Compare December 30, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Indicates a change to dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant