Uncontrolled Recursion Affecting std/go/build/constraint package, versions <1.22.7>=1.23.0-0 <1.23.1


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
1.05% (60th percentile)

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 IDSNYK-GOLANG-STDGOBUILDCONSTRAINT-14545644
  • published6 Jan 2026
  • disclosed6 Sept 2024
  • creditUnknown

Introduced: 6 Sep 2024

CVE-2024-34158  (opens in a new tab)
CWE-674  (opens in a new tab)

How to fix?

Upgrade std/go/build/constraint to version 1.22.7, 1.23.1 or higher.

Overview

std/go/build/constraint is a Go standard library package std/go/build/constraint

Affected versions of this package are vulnerable to Uncontrolled Recursion.

Go Vulnerability Report:
Calling Parse on a "// +build" build tag line with deeply nested expressions can cause a panic due to stack exhaustion.

CVSS Base Scores

version 4.0
version 3.1