Skip to main content
Mallory
CriticalVulnerability

CVE-2023-29402: Code injection in Go cgo through package directories containing newlines

Published Jun 8, 2023 · Updated 4 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days2 mentions · peak 1 in a dayToday
CVSS9.8Critical · v3.1
EPSS1.8%79th percentile
CISA KEVNoNot listed
In the wildNoneNo exploitation reported
Vendors
Fedora ProjectGolang
IdentifiersCVE-2023-29402CWE-94 · Improper Control of Generation of…

CVE-2023-29402 is a code-injection vulnerability in Go's cmd/go and cmd/cgo build tooling. When building untrusted code that uses cgo, package directory names containing newline characters can cause the Go command to generate unexpected code. The resulting program may execute attacker-influenced code or exhibit unexpected behavior when run. Modules retrieved through the Go command in module-aware mode, including through go get, are not affected by this attack vector; packages retrieved in GOPATH mode may be affected.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

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.

Successful exploitation compromises the integrity of generated code and resulting executables. Running an affected executable can execute injected code with the privileges of the executing process, potentially compromising accessible data and resources. The vulnerability does not establish an independently reachable network attack surface; exposure depends on processing attacker-controlled package directories with the affected build tooling.

Mitigation

If you can’t patch tonight, do this now.

Avoid building or running untrusted cgo packages, and reject package directory names containing newline characters before building. Use module-aware dependency retrieval through the Go command rather than GOPATH mode. Where application dependencies permit, disabling cgo avoids the affected code-generation path.

Remediation

Patch, then assume compromise.

Update the Go toolchain to a release or vendor-maintained package containing the CVE-2023-29402 fix, then rebuild affected cgo applications from trusted source using the corrected toolchain. For TuxCare EL7 installations, the identified fixed package version is 1.9.4-1.el7.tuxcare.els1; update all applicable installed golang components. Products bundling Go should receive their vendor-provided security updates.

Public exploits

Exploits

No public exploits tracked yet. Mallory keeps watching.

View more in app →
No public exploit code observed for this vulnerability. Mallory keeps watching.
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Fedora ProjectFedoraoperating_system
GolangGoapplication
FAQ

Frequently asked questions

Is CVE-2023-29402 exploited in the wild?
As of Nov 24, 2026, Mallory has no reports of CVE-2023-29402 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2023-29402?
As of Nov 24, 2026, Mallory has found no public exploit for CVE-2023-29402.
Is there a patch for CVE-2023-29402?
Update the Go toolchain to a release or vendor-maintained package containing the CVE-2023-29402 fix, then rebuild affected cgo applications from trusted source using the corrected toolchain. For TuxCare EL7 installations, the identified fixed package version is 1.9.4-1.el7.tuxcare.els1; update all applicable installed golang components.
What products are affected by CVE-2023-29402?
Golang Go and Fedora Project Fedora.
How severe is CVE-2023-29402?
CVE-2023-29402 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 1.8% (79th percentile) as of Nov 24, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.