{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.1",
    "cveMetadata": {
        "cveId": "CVE-2023-39323",
        "assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
        "state": "PUBLISHED",
        "assignerShortName": "Go",
        "dateReserved": "2023-07-27T17:05:55.188Z",
        "datePublished": "2023-10-05T20:36:58.756Z",
        "dateUpdated": "2024-08-02T18:02:06.899Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
                "shortName": "Go",
                "dateUpdated": "2023-10-05T20:36:58.756Z"
            },
            "title": "Arbitrary code execution during build via line directives in cmd/go",
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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."
                }
            ],
            "affected": [
                {
                    "vendor": "Go toolchain",
                    "product": "cmd/go",
                    "collectionURL": "https://pkg.go.dev",
                    "packageName": "cmd/go",
                    "versions": [
                        {
                            "version": "0",
                            "lessThan": "1.20.9",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "1.21.0-0",
                            "lessThan": "1.21.2",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ],
                    "defaultStatus": "unaffected"
                }
            ],
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "description": "CWE 94: Improper Control of Generation of Code ('Code Injection')"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://go.dev/issue/63211"
                },
                {
                    "url": "https://go.dev/cl/533215"
                },
                {
                    "url": "https://groups.google.com/g/golang-announce/c/XBa1oHDevAo"
                },
                {
                    "url": "https://pkg.go.dev/vuln/GO-2023-2095"
                },
                {
                    "url": "https://security.netapp.com/advisory/ntap-20231020-0001/"
                },
                {
                    "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KSEGD2IWKNUO3DWY4KQGUQM5BISRWHQE/"
                },
                {
                    "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CLB4TW7KALB3EEQWNWCN7OUIWWVWWCG2/"
                },
                {
                    "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XFOIBB4YFICHDM7IBOP7PWXW3FX4HLL2/"
                },
                {
                    "url": "https://security.gentoo.org/glsa/202311-09"
                }
            ]
        },
        "adp": [
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-02T18:02:06.899Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://go.dev/issue/63211",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://go.dev/cl/533215",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://groups.google.com/g/golang-announce/c/XBa1oHDevAo",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://pkg.go.dev/vuln/GO-2023-2095",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://security.netapp.com/advisory/ntap-20231020-0001/",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KSEGD2IWKNUO3DWY4KQGUQM5BISRWHQE/",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CLB4TW7KALB3EEQWNWCN7OUIWWVWWCG2/",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XFOIBB4YFICHDM7IBOP7PWXW3FX4HLL2/",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://security.gentoo.org/glsa/202311-09",
                        "tags": [
                            "x_transferred"
                        ]
                    }
                ]
            }
        ]
    }
}