{"id":"CVE-2023-27581","aliases":["GHSA-6q4m-7476-932w"],"summary":"github-slug-action vulnerable to arbitrary code execution","published_at":"2023-03-13T20:19:23.35Z","modified_at":"2026-09-10T03:49:52.759231Z","products":[{"slug":"github-actions","name":"GitHub Actions","category":"gitops-cicd"}],"rating":{"severity":"high","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","attack_path":"internet_authenticated","user_interaction":false,"malicious":false},"fix_available":true,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.01576000079512596,"percentile":0.7599499821662903,"date":"2026-11-19T00:00:00Z"},"priority":9.8,"details":"github-slug-action is a GitHub Action to expose slug value of GitHub environment variables inside of one's GitHub workflow. Starting in version 4.0.0` and prior to version 4.4.1, this action uses the `github.head_ref` parameter in an insecure way. This vulnerability can be triggered by any user on GitHub on any workflow using the action on pull requests. They just need to create a pull request with a branch name, which can contain the attack payload. This can be used to execute code on the GitHub runners and to exfiltrate any secrets one uses in the CI pipeline. A patched action is available in version 4.4.1. No workaround is available.","affected_stack":[{"ecosystem":"GitHub Actions","package":"rlespinasse/github-slug-action","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0"},{"fixed":"4.4.1"}]}],"fixed":["4.4.1"],"provider":"osv","source":"GHSA-6q4m-7476-932w","relation":"self"}],"affected_other":[{"ecosystem":"CVE","package":"rlespinasse/github-slug-action","versions":[">= 4.0.0, < 4.4.1"],"provider":"cvelistv5","source":"CVE-2023-27581","relation":"self"},{"ecosystem":"NVD","package":"github-slug-action_project:github-slug-action","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0"},{"fixed":"4.4.1"}]}],"fixed":["4.4.1"],"provider":"nvd","source":"CVE-2023-27581","relation":"self"}],"product_status":[],"records":[{"provider":"cvelistv5","source_id":"CVE-2023-27581","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2023-27581","license":"CC-BY-4.0","published_at":"2023-03-13T20:19:23.35Z","modified_at":"2025-02-25T14:58:17.504Z","summary":"github-slug-action vulnerable to arbitrary code execution","details":"github-slug-action is a GitHub Action to expose slug value of GitHub environment variables inside of one's GitHub workflow. Starting in version 4.0.0` and prior to version 4.4.1, this action uses the `github.head_ref` parameter in an insecure way. This vulnerability can be triggered by any user on GitHub on any workflow using the action on pull requests. They just need to create a pull request with a branch name, which can contain the attack payload. This can be used to execute code on the GitHub runners and to exfiltrate any secrets one uses in the CI pipeline. A patched action is available in version 4.4.1. No workaround is available.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CVE-2023-27581"}],"affected":[{"ecosystem":"CVE","package":"rlespinasse/github-slug-action","versions":[">= 4.0.0, < 4.4.1"],"provider":"cvelistv5","source":"CVE-2023-27581","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/rlespinasse/github-slug-action/security/advisories/GHSA-6q4m-7476-932w"},{"type":"WEB","url":"https://github.com/rlespinasse/github-slug-action/commit/102b1a064a9b145e56556e22b18b19c624538d94"},{"type":"WEB","url":"https://github.com/rlespinasse/github-slug-action/releases/tag/v4.4.1"},{"type":"WEB","url":"https://securitylab.github.com/research/github-actions-untrusted-input/"}]},{"provider":"nvd","source_id":"CVE-2023-27581","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-27581","severity":[],"affected":[{"ecosystem":"NVD","package":"github-slug-action_project:github-slug-action","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0"},{"fixed":"4.4.1"}]}],"fixed":["4.4.1"],"provider":"nvd","source":"CVE-2023-27581","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"GHSA-6q4m-7476-932w","relation":"self","url":"https://osv.dev/vulnerability/GHSA-6q4m-7476-932w","license":"CC-BY-4.0","published_at":"2023-03-13T20:43:33Z","modified_at":"2026-09-10T03:49:52.759231Z","summary":"github-slug-action vulnerable to arbitrary code execution","details":"### Impact\n\nThis action uses the `github.head_ref` parameter in an insecure way. \n\nThis vulnerability can be triggered by any user on GitHub on any workflow using the action on pull requests. They just need to create a pull request with a branch name, which can contain the attack payload. (Note that first-time PR requests will not be run - but the attacker can submit a valid PR before submitting an invalid PR).  This can be used to execute code on the GitHub runners (potentially use it for crypto-mining, and waste your resources) and to exfiltrate any secrets you use in the CI pipeline.\n\n### Patches\n\n> Pass the variable as an environment variable and then use the environment variable instead of substituting it directly.\n\nPatched action is available on tag **v4**, tag **v4.4.1**, and any tag beyond.\n\n### Workarounds\n\nNo workaround is available if impacted, please upgrade the version\n\n> ℹ️ **v3** and **v4** are compatibles.\n\n### References\n\n[Here](https://securitylab.github.com/research/github-actions-untrusted-input/) is a set of blog posts by Github's security team explaining this issue.\n\n### Thanks\n\nThanks to the team of researchers from Purdue University, who are working on finding vulnerabilities in CI/CD configurations of open-source software. Their tool detected this security vulnerability.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"GHSA-6q4m-7476-932w"}],"affected":[{"ecosystem":"GitHub Actions","package":"rlespinasse/github-slug-action","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0"},{"fixed":"4.4.1"}]}],"fixed":["4.4.1"],"provider":"osv","source":"GHSA-6q4m-7476-932w","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/rlespinasse/github-slug-action/security/advisories/GHSA-6q4m-7476-932w"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-27581"},{"type":"WEB","url":"https://github.com/rlespinasse/github-slug-action/commit/102b1a064a9b145e56556e22b18b19c624538d94"},{"type":"PACKAGE","url":"https://github.com/rlespinasse/github-slug-action"},{"type":"WEB","url":"https://github.com/rlespinasse/github-slug-action/releases/tag/v4.4.1"},{"type":"WEB","url":"https://securitylab.github.com/research/github-actions-untrusted-input"}]}],"references":[{"type":"WEB","url":"https://github.com/rlespinasse/github-slug-action/security/advisories/GHSA-6q4m-7476-932w"},{"type":"WEB","url":"https://github.com/rlespinasse/github-slug-action/commit/102b1a064a9b145e56556e22b18b19c624538d94"},{"type":"WEB","url":"https://github.com/rlespinasse/github-slug-action/releases/tag/v4.4.1"},{"type":"WEB","url":"https://securitylab.github.com/research/github-actions-untrusted-input/"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-27581"},{"type":"PACKAGE","url":"https://github.com/rlespinasse/github-slug-action"},{"type":"WEB","url":"https://securitylab.github.com/research/github-actions-untrusted-input"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2023-27581","url":"https://www.cve.org/CVERecord?id=CVE-2023-27581","license":"CC-BY-4.0","modified_at":"2025-02-25T14:58:17.504Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2023-27581","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-27581","relation":"self"},{"provider":"osv","source_id":"GHSA-6q4m-7476-932w","url":"https://osv.dev/vulnerability/GHSA-6q4m-7476-932w","license":"CC-BY-4.0","modified_at":"2026-09-10T03:49:52.759231Z","relation":"self"}]}
