{"id":"CVE-2023-27581","aliases":["CVE-2023-27581","GHSA-6q4m-7476-932w"],"related":[],"kind":"vulnerability","state":"published","title":"github-slug-action vulnerable to arbitrary code execution","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"}],"published":"2023-03-13T20:19:23.350Z","modified":"2026-09-10T03:49:52.759Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-77"],"affected":[{"ranges":[{"version":">= 4.0.0, < 4.4.1","status":"affected"}],"vendor":"rlespinasse","product":"github-slug-action","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0","status":"affected","fixed":"4.4.1"}],"ecosystem":"GitHub Actions","package":"rlespinasse/github-slug-action","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"4.0.0","fixed":"4.4.1"}],"vendor":"github-slug-action_project","product":"github-slug-action","cpe":"cpe:2.3:a:github-slug-action_project:github-slug-action:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/rlespinasse/github-slug-action/security/advisories/GHSA-6q4m-7476-932w","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rlespinasse/github-slug-action/commit/102b1a064a9b145e56556e22b18b19c624538d94","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rlespinasse/github-slug-action/releases/tag/v4.4.1","tags":["release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://securitylab.github.com/research/github-actions-untrusted-input/","tags":["exploit","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-27581","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rlespinasse/github-slug-action","tags":["package"],"sources":["ghsa"]},{"url":"https://securitylab.github.com/research/github-actions-untrusted-input","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-02-25T14:29:34.266Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-27581","url":"https://www.cve.org/CVERecord?id=CVE-2023-27581","licence":"CVE Terms of Use","modified":"2025-02-25T14:58:17.504Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6q4m-7476-932w","url":"https://github.com/advisories/GHSA-6q4m-7476-932w","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:52.759Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-27581","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-27581","licence":"Public domain","modified":"2026-06-17T05:45:30.863Z"}],"updatedAt":"2026-11-25T22:58:22.405Z","epss":{"score":0.01576,"percentile":0.76194,"date":"2026-12-01T12:00:22.000Z"}}