All CVEs / Go standard library
CVE-2024-34158Go standard library go/build/constraint
High 7.5 No auth needed
Follow: this CVE · Go standard library · Go standard library go/build/constraint We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 1.4% probability of exploitation in 30 days · percentile 73
- Auth required
- No
- Published
- Sep 6, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-674
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
Calling Parse on a "// +build" build tag line with deeply nested expressions can cause a panic due to stack exhaustion.
What to do
- Apply the vendor's security update for go/build/constraint.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | stdlib |
< 1.22.7 |
1.22.7 |
go get stdlib@v1.22.7 |
| Go | stdlib |
≥ 1.23.0-0 < 1.23.1 |
1.23.1 |
go get stdlib@v1.23.1 |
Per OSV / GitHub Advisories (GO-2024-3107). Check the version in your lockfile before upgrading.
Affected products
- Go standard library · go/build/constraint
- go_build_constraint · go_standard_library
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official advisories
- Red Hat Security Advisory: osbuild and osbuild-composer security update · Red Hat · RHSA-2025:7118 · Aug 5, 2026 High
- Red Hat Security Advisory: OpenShift Container Platform 4.14.40 packages and security update · Red Hat · RHSA-2024:8700 · Nov 13, 2024 High
- Red Hat Security Advisory: buildah security update · Red Hat · RHSA-2024:9459 · Nov 13, 2024 High
Also: Red Hat (+4)
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.