CVE-2024-34158: Stack Exhaustion DoS in Go go/build/constraint Parse
CVE-2024-34158 is an uncontrolled-recursion vulnerability in Go's go/build/constraint package. Calling Parse on a legacy "// +build" build-tag line containing deeply nested expressions can exhaust the process stack and trigger a panic. The resulting process termination can cause denial of service in applications that parse attacker-controlled or otherwise untrusted build-tag input.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
A crafted build-tag expression can exhaust the stack and panic the affected Go process, causing loss of availability and denial of service. No confidentiality or integrity impact is described.
Mitigation
If you can’t patch tonight, do this now.
Until patched, do not pass untrusted or unbounded build-tag input to go/build/constraint.Parse. Enforce strict input-size and nesting-depth limits before parsing, reject legacy build constraints from untrusted sources where feasible, and isolate parsing workloads so a panic cannot disrupt critical services.
Remediation
Patch, then assume compromise.
Update affected golang-1.23 packages to version 1.23.1 or later. For vendor-distributed Go runtimes and products that embed the vulnerable component, apply the applicable vendor security update containing the corrected Go packages.
Exploits
No public exploits tracked yet. Mallory keeps watching.
References
Frequently asked questions
- Is CVE-2024-34158 exploited in the wild?
- As of Oct 2, 2026, Mallory has no reports of CVE-2024-34158 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2024-34158?
- As of Oct 2, 2026, Mallory has found no public exploit for CVE-2024-34158.
- Is there a patch for CVE-2024-34158?
- Update affected golang-1.23 packages to version 1.23.1 or later. For vendor-distributed Go runtimes and products that embed the vulnerable component, apply the applicable vendor security update containing the corrected Go packages.
- How severe is CVE-2024-34158?
- CVE-2024-34158 has a CVSS v3.1 score of 7.5 (High) and an EPSS score of 1.4% (73rd percentile) as of Oct 2, 2026.
Recent activity
40 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.