{"id":"CVE-2023-23939","aliases":["EUVD-2023-1065","GHSA-p756-rfxh-x63h"],"status":"published","title":"Azure/setup-kubectl: Escalation of privilege vulnerability for v3 and lower","description":"Azure/setup-kubectl is a GitHub Action for installing Kubectl. This vulnerability only impacts versions before version 3. An insecure temporary creation of a file allows other actors on the Actions runner to replace the Kubectl binary created by this action because it is world writable. This Kubectl tool installer runs `fs.chmodSync(kubectlPath, 777)` to set permissions on the Kubectl binary, however, this allows any local user to replace the Kubectl binary. This allows privilege escalation to the user that can also run kubectl, most likely root. This attack is only possible if an attacker somehow breached the GitHub actions runner or if a user is utilizing an Action that maliciously executes this attack. This has been fixed and released in all versions `v3` and later. 775 permissions are used instead. Users are advised to upgrade. There are no known workarounds for this issue.","severity":{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L","level":"low","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00362,"percentile":0.30212,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-732"],"published":"2023-03-06T18:19:05Z","modified":"2026-10-28T02:31:13Z","fixes":[{"ecosystem":"GitHub Actions","package":"Azure/setup-kubectl","fixed_in":["3"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"GitHub Actions","package":"Azure/setup-kubectl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3"}]}]},{"source":"osv","ecosystem":"GitHub Actions","package":"Azure/setup-kubectl","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3"}]}]}],"products":[{"vendor":"azure","product":"setup-kubectl"},{"vendor":"microsoft","product":"azure_setup_kubectl"}],"references":[{"url":"https://github.com/Azure/setup-kubectl/security/advisories/GHSA-p756-rfxh-x63h","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://github.com/Azure/setup-kubectl/commit/d449d75495d2b9d1463555bb00ca3dca77a42ab6","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-23939","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-p756-rfxh-x63h"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/23xxx/CVE-2023-23939.json","tags":["advisory"]},{"url":"https://github.com/Azure/setup-kubectl","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2023-23939","title":"Azure/setup-kubectl: Escalation of privilege vulnerability for v3 and lower","description":"Azure/setup-kubectl is a GitHub Action for installing Kubectl. This vulnerability only impacts versions before version 3. An insecure temporary creation of a file allows other actors on the Actions runner to replace the Kubectl binary created by this action because it is world writable. This Kubectl tool installer runs `fs.chmodSync(kubectlPath, 777)` to set permissions on the Kubectl binary, however, this allows any local user to replace the Kubectl binary. This allows privilege escalation to the user that can also run kubectl, most likely root. This attack is only possible if an attacker somehow breached the GitHub actions runner or if a user is utilizing an Action that maliciously executes this attack. This has been fixed and released in all versions `v3` and later. 775 permissions are used instead. Users are advised to upgrade. There are no known workarounds for this issue.\n","status":"published","published":"2023-03-06T18:19:05.155Z","modified":"2025-02-25T15:00:56.243Z","cvss":[{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L","level":"low","assessor":"cna"}],"cwes":["CWE-732"],"updated_at":"2026-11-02T14:35:21.232549Z"}],"euvd":[{"id":"EUVD-2023-1065","description":"Azure/setup-kubectl is a GitHub Action for installing Kubectl. This vulnerability only impacts versions before version 3. An insecure temporary creation of a file allows other actors on the Actions runner to replace the Kubectl binary created by this action because it is world writable. This Kubectl tool installer runs `fs.chmodSync(kubectlPath, 777)` to set permissions on the Kubectl binary, however, this allows any local user to replace the Kubectl binary. This allows privilege escalation to the user that can also run kubectl, most likely root. This attack is only possible if an attacker somehow breached the GitHub actions runner or if a user is utilizing an Action that maliciously executes this attack. This has been fixed and released in all versions `v3` and later. 775 permissions are used instead. Users are advised to upgrade. There are no known workarounds for this issue.\n","status":"published","published":"2023-03-06T18:19:05Z","modified":"2025-02-25T15:00:56Z","cvss":[{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L","level":"low"}],"updated_at":"2026-11-02T20:53:24.646946Z"}],"ghsa":[{"id":"GHSA-p756-rfxh-x63h","title":"Azure/setup-kubectl: Escalation of privilege vulnerability for v3 and lower","description":"### Impact\n\nThis vulnerability only impacts versions `v2` and lower. An insecure temporary creation of a file allows other actors on the Actions runner to replace the Kubectl binary created by this action because it is world writable. This Kubectl tool installer runs `fs.chmodSync(kubectlPath, 777)` to set permissions on the Kubectl binary, however, this allows any local user to replace the Kubectl binary. This allows privilege escalation to the user that can also run kubectl, most likely root. This attack is only possible if an attacker somehow breached the GitHub actions runner or if a user is utilizing an Action that maliciously executes this attack.\n\nNo impacted customers have been reported.\n\n### Patches\n\nThis has been fixed and released in all versions `v3` and later. 755 permissions are used instead.\n\n### Workarounds\n\nIf users absolutely cannot upgrade to `v3` or higher than they should be extra diligent of the other GitHub actions they are using in a workflow and ensure that their GitHub actions runner is secure.\n","status":"published","published":"2023-03-07T20:07:27Z","modified":"2023-03-07T20:07:27Z","cvss":[{"version":"3.1","score":3,"vector":"CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N","level":"low"}],"cwes":["CWE-732"],"updated_at":"2026-11-02T14:36:47.279442Z"}],"nvd":[{"id":"CVE-2023-23939","description":"Azure/setup-kubectl is a GitHub Action for installing Kubectl. This vulnerability only impacts versions before version 3. An insecure temporary creation of a file allows other actors on the Actions runner to replace the Kubectl binary created by this action because it is world writable. This Kubectl tool installer runs `fs.chmodSync(kubectlPath, 777)` to set permissions on the Kubectl binary, however, this allows any local user to replace the Kubectl binary. This allows privilege escalation to the user that can also run kubectl, most likely root. This attack is only possible if an attacker somehow breached the GitHub actions runner or if a user is utilizing an Action that maliciously executes this attack. This has been fixed and released in all versions `v3` and later. 775 permissions are used instead. Users are advised to upgrade. There are no known workarounds for this issue.\n","status":"published","published":"2023-03-06T19:15:10.297Z","modified":"2026-06-17T05:38:20.003Z","cvss":[{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L","level":"low","assessor":"secondary"},{"version":"3.1","score":7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-732"],"updated_at":"2026-11-02T14:07:48.342507Z"}],"osv":[{"id":"CVE-2023-23939","title":"Azure/setup-kubectl: Escalation of privilege vulnerability for v3 and lower","description":"Azure/setup-kubectl is a GitHub Action for installing Kubectl. This vulnerability only impacts versions before version 3. An insecure temporary creation of a file allows other actors on the Actions runner to replace the Kubectl binary created by this action because it is world writable. This Kubectl tool installer runs `fs.chmodSync(kubectlPath, 777)` to set permissions on the Kubectl binary, however, this allows any local user to replace the Kubectl binary. This allows privilege escalation to the user that can also run kubectl, most likely root. This attack is only possible if an attacker somehow breached the GitHub actions runner or if a user is utilizing an Action that maliciously executes this attack. This has been fixed and released in all versions `v3` and later. 775 permissions are used instead. Users are advised to upgrade. There are no known workarounds for this issue.\n","status":"published","published":"2023-03-06T18:19:05.155Z","modified":"2026-10-28T02:31:13.944428657Z","cvss":[{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:L","level":"low"}],"cwes":["CWE-732"],"updated_at":"2026-11-02T15:44:30.709518Z"},{"id":"GHSA-p756-rfxh-x63h","title":"Azure/setup-kubectl: Escalation of privilege vulnerability for v3 and lower","description":"### Impact\n\nThis vulnerability only impacts versions `v2` and lower. An insecure temporary creation of a file allows other actors on the Actions runner to replace the Kubectl binary created by this action because it is world writable. This Kubectl tool installer runs `fs.chmodSync(kubectlPath, 777)` to set permissions on the Kubectl binary, however, this allows any local user to replace the Kubectl binary. This allows privilege escalation to the user that can also run kubectl, most likely root. This attack is only possible if an attacker somehow breached the GitHub actions runner or if a user is utilizing an Action that maliciously executes this attack.\n\nNo impacted customers have been reported.\n\n### Patches\n\nThis has been fixed and released in all versions `v3` and later. 755 permissions are used instead.\n\n### Workarounds\n\nIf users absolutely cannot upgrade to `v3` or higher than they should be extra diligent of the other GitHub actions they are using in a workflow and ensure that their GitHub actions runner is secure.\n","status":"published","published":"2023-03-07T20:07:27Z","modified":"2026-09-10T03:49:52.951424087Z","cvss":[{"version":"3.1","score":3,"vector":"CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N","level":"low"}],"cwes":["CWE-732"],"updated_at":"2026-11-02T15:46:52.891208Z"}]}}
