CVE-2023-39323
golang: cmd/go: line directives allows arbitrary execution during build
Overview
Description
Line directives ("//line") can be used to bypass the restrictions on "//go:cgo_" directives, allowing blocked linker and compiler flags to be passed during compilation. This can result in unexpected execution of arbitrary code when running "go build". The line directive requires the absolute path of the file in which the directive lives, which makes exploiting this issue significantly more complex.
Source: OX vulnerability database
Severity
8.1 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Bitnami | golang | <1.20.9>=1.21.0, <1.21.2 | 1.20.91.21.2 |
Open a package to see all its vulnerabilities.
Operating systems · 47 fixes
Azure Linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | golang | 0: 1.20.10-1.azl3 |
Photon OS 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | go | 1.20.10-1.ph4 |
| 5.0 | go | 1.20.10-1.ph5 |
Red Hat 3 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| go-toolset-7-golang +6 | wont fix | — | |
| 8 (go-toolset:rhel8) | go-toolset +6 | 0:1.20.10-1.module+el8.9.0+20382+04f7fe80 | RHBA-2023:6928 |
| 8 (go-toolset:rhel8) | delve | 0:1.20.2-1.module+el8.9.0+18926+5193682d | RHBA-2023:6928 |
| 9 | go-toolset +7 | affected | — |
SUSE Linux Enterprise 2 releases · 4 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.4 | go1-20-openssl +2 | 1.20.11.1-150000.1.14.1 | SUSE-SU-2023:4472-1 |
| 15.4 | go1-20 +2 | 1.20.9-150000.1.26.1 | SUSE-SU-2023:4018-1 |
| 15.4 | go1-21 +2 | 1.21.2-150000.1.9.1 | SUSE-SU-2023:4017-1 |
| 15.4 | go1-21-openssl +2 | 1.21.4.1-150000.1.5.1 | SUSE-SU-2023:4469-1 |
| 15.5 | go1-20-openssl +2 | 1.20.11.1-150000.1.14.1 | SUSE-SU-2023:4472-1 |
| 15.5 | go1-20 +2 | 1.20.9-150000.1.26.1 | SUSE-SU-2023:4018-1 |
2 more rows
alpine 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | go | 1.21.2-r0 |
| 3.23 | go | 1.21.2-r0 |
| 3.24 | go | 1.21.2-r0 |
| edge | go | 1.21.2-r0 |
amazon linux 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 2023 | golang +6 | 1.20.10-1.amzn2023.0.1 |
| 2023 | ecs-service-connect-agent | v1.27.2.0-1.amzn2023 |
chainguard 1 release · 5 packages
| Release | Package | Fixed in |
|---|---|---|
| configmap-reload-fips | 0.12.0-r2 | |
| kubeflow-katib | 0.19.0-r40 | |
| kind | 0.21.0-r0 | |
| metrics-server | 0.6.4-r2 | |
| smarter-device-manager-fips | 1.20.11-r2 |
debian 3 releases · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 10 | golang-1-11 | affected |
| 11 | golang-1-15 | affected |
| 12 | golang-1-19 | affected |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| golang-1-19 | affected |
openSUSE 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | go1-20 +3 | 1.20.9-1.1 | openSUSE-SU-2024:13306-1 |
| Tumbleweed | go1-21 +3 | 1.21.2-1.1 | openSUSE-SU-2024:13307-1 |
root.io debian 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 12 | rootio-golang-1-19 | affected |
ubuntu 4 releases · 4 packages
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | golang-1-18 | 1.18.1-1ubuntu1~18.04.4+esm1 |
| 20.04 | golang-1-18 | 1.18.1-1ubuntu1~20.04.3 |
| 20.04 | golang-1-20 | 1.20.3-1ubuntu0.1~20.04.1 |
| 20.04 | golang-1-21 | 1.21.1-1~ubuntu20.04.2 |
| 20.04-ESM | golang-1-18 | 1.18.1-1ubuntu1~20.04.3 |
| 20.04-ESM | golang-1-20 | 1.20.3-1ubuntu0.1~20.04.1 |
5 more rows
wolfi 1 release · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| kubeflow-katib | 0.19.0-r40 | |
| kind | 0.21.0-r0 | |
| metrics-server | 0.6.4-r2 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2023-39323
- github.com https://github.com/golang/go/commit/2ddfc04d12da7028334ab4f8effbc3a78b92d9d2 (go1.21.2)
- github.com https://github.com/golang/go/commit/31d5b604ac0adb58aec4870ac1b974c08312fd49 (go1.20.9)
- go.dev https://go.dev/cl/533215
- go.dev https://go.dev/issue/63211
- groups.google.com https://groups.google.com/g/golang-announce/c/XBa1oHDevAo
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CLB4TW7KALB3EEQWNWCN7OUIWWVWWCG2/
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KSEGD2IWKNUO3DWY4KQGUQM5BISRWHQE/
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XFOIBB4YFICHDM7IBOP7PWXW3FX4HLL2/
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2023-39323
Show all 18 references
- pkg.go.dev https://pkg.go.dev/vuln/GO-2023-2095
- security.gentoo.org https://security.gentoo.org/glsa/202311-09
- security.netapp.com https://security.netapp.com/advisory/ntap-20231020-0001/
- ubuntu.com https://ubuntu.com/security/notices/USN-6574-1
- ubuntu.com https://ubuntu.com/security/notices/USN-7109-1
- ubuntu.com https://ubuntu.com/security/notices/USN-7111-1
- vuln.go.dev https://vuln.go.dev/ID/GO-2023-2095.json
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2023-39323
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.