Read the docs
TI-2023-13782 Aliases CVE-2023-29402GHSA-f2cj-5636-4j38

Code injection via go command with cgo in cmd/go

Priority MEDIUM 52CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 5 fixed, 2 without a fix

Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA and Red Hat. Impact type from CWE-94.

Summary

The go command may generate unexpected code at build time when using cgo. This may result in unexpected behavior when running a go program which uses cgo. This may occur when running an untrusted module which contains directories with newline characters in their names. Modules which are retrieved using the go command, i.e. via "go get", are not affected (modules retrieved using GOPATH-mode, i.e. GO111MODULE=off, may be affected).

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01694 77th percentileScored 2026-11-07
Fix Partial cmd/go (Go toolchain): 1.19.10, 1.20.5Red Hat: 4 advisoriesRed Hat: 5 fixed, 2 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
Go standard librarycmd/gobefore 1.19.10; 1.20.0-0 to before 1.20.51.19.10, 1.20.5Patch availableCNA
  • cmd/go VendorGo standard library Affected before 1.19.10; 1.20.0-0 to before 1.20.5 Fixed in 1.19.10, 1.20.5 Patch available CNA

CPE configurations NVD · 2

CPEVersionsRoleVendor
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*before 1.19.10; 1.20.0 to before 1.20.5VulnerableGo standard library
cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*38VulnerableFedoraproject
  • cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* Versions before 1.19.10; 1.20.0 to before 1.20.5 Vulnerable ·Go standard library
  • cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:* Versions 38 Vulnerable ·Fedoraproject

Remediation

  • Fix · CNA cmd/go (Go toolchain) Fixed in 1.19.10, 1.20.5

Red Hat 4 advisories

  • RHSA-2024:4119 Released 2024-06-26 · Red Hat rating Important
    Updated rhceph-5.3 container image and security update
    • Red Hat Ceph Storage 5.3 Tools rhceph/keepalived-rhel8, rhceph/rhceph-5-dashboard-rhel8, rhceph/rhceph-5-rhel8 +2
  • RHSA-2023:3923 Released 2023-06-29 · Red Hat rating Critical
    go-toolset and golang security update
    • Red Hat Enterprise Linux AppStream (v. 9) go-toolset-1.19.10-1.el9_2, golang-1.19.10-1.el9_2, golang-bin-1.19.10-1.el9_2 +5
  • RHSA-2023:3922 Released 2023-06-29 · Red Hat rating Critical
    go-toolset:rhel8 security update
    • Red Hat Enterprise Linux AppStream (v. 8) delve-1.9.1-1.module+el8.8.0+16778+5fbb74f5.src::go-toolset:rhel8, delve-1.9.1-1.module+el8.8.0+16778+5fbb74f5.x86_64::go-toolset:rhel8, go-toolset-1.19.10-1.module+el8.8.0+19203+782922b7.aarch64::go-toolset:rhel8 +18
Show 1 more Red Hat advisories
  • RHSA-2023:3920 Released 2023-06-29 · Red Hat rating Critical
    go-toolset-1.19 and go-toolset-1.19-golang security update
    • Red Hat Developer Tools for Red Hat Enterprise Linux Server (v. 7) go-toolset-1.19-1.19.10-1.el7_9, go-toolset-1.19-build-1.19.10-1.el7_9, go-toolset-1.19-golang-1.19.10-1.el7_9 +8
    • Red Hat Developer Tools for Red Hat Enterprise Linux Workstation (v. 7) go-toolset-1.19-1.19.10-1.el7_9, go-toolset-1.19-build-1.19.10-1.el7_9, go-toolset-1.19-golang-1.19.10-1.el7_9 +8

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    Go toolchain cmd/go 1.19.10, 1.20.5

    3 records Highest priority Priority MEDIUM 3 MEDIUM

    Other records, highest priority first

    • TI-2023-13785 Improper sanitization of LDFLAGS with embedded spaces in go command with cgo in cmd/goPriority MEDIUM 52
    • TI-2023-13784 Improper handling of non-optional LDFLAGS in go command with cgo in cmd/goPriority MEDIUM 52

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Ceph Storage 3AffectedNo fix planned: Will not fix
Red Hat Storage 3AffectedNo fix planned: Will not fix
Red Hat Ceph Storage 5.3 ToolsFixed RHSA-2024:4119
Red Hat Developer Tools for Red Hat Enterprise Linux Server (v. 7)Fixed RHSA-2023:3920
Red Hat Developer Tools for Red Hat Enterprise Linux Workstation (v. 7)Fixed RHSA-2023:3920
Red Hat Enterprise Linux AppStream (v. 8)Fixed RHSA-2023:3922
Red Hat Enterprise Linux AppStream (v. 9)Fixed RHSA-2023:3923

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-29402
  2. 2026-10-03 Alias added: GHSA-f2cj-5636-4j38

References

  • TI-2020-00578 Improper certificate validation in Microsoft Windows KEVCVSS 3.1HIGH 8.1
  • TI-2023-23979 The HTTP/2 protocol allows a denial of service (server resource consumption) because… KEVCVSS 3.1HIGH 7.5
  • TI-2018-05208 The "go get" implementation in Go 1.9.4, when the -insecure command-line option is used… CVSS 3.1HIGH 8.8
  • TI-2018-12083 Improper input validation in [UNKNOWN] golang CVSS 3.1HIGH 8.1
  • TI-2024-16306 Mishandling of corrupt central directory record in archive/zip CVSS 3.1MEDIUM 5.5
  • TI-2021-15910 Go before 1.16.9 and 1.17.x before 1.17.2 has a Buffer Overflow via large arguments in a… CVSS 3.1CRITICAL 9.8
See all 170 →

Sources