Allocation of Resources Without Limits or Throttling Affecting github.com/expr-lang/expr/vm package, versions <1.17.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Allocation of Resources Without Limits or Throttling vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMEXPRLANGEXPRVM-9460820
  • published18 Mar 2025
  • disclosed17 Mar 2025
  • creditVille Vesilehto

Introduced: 17 Mar 2025

NewCVE-2025-29786  (opens in a new tab)
CWE-770  (opens in a new tab)

How to fix?

Upgrade github.com/expr-lang/expr/vm to version 1.17.0 or higher.

Overview

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling in the parseExpression() function in parser.go, due to the unrestricted size of input strings, which can cause the generation of large Abstract Syntax Trees (ASTs). An attacker can crash the application by supplying excessively long deeply nested expression strings.

Workaround

This vulnerability can be avoided by checking and limiting the length of input expressions before parsing them.

CVSS Base Scores

version 4.0
version 3.1