{"id":"CVE-2023-27581","aliases":["GHSA-6q4m-7476-932w"],"url":"https://o3.security/vulnerability/CVE-2023-27581","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.","published":"2023-03-13T20:19:23.350Z","modified":"2026-10-28T02:30:37.694769961Z","cvss":{"score":8.8,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"GitHub Actions","name":"rlespinasse/github-slug-action","fixedVersion":"4.4.1"}],"fix":{"url":"https://github.com/rlespinasse/github-slug-action/commit/102b1a064a9b145e56556e22b18b19c624538d94","label":"rlespinasse/github-slug-action@102b1a0"},"references":[{"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://github.com/CVEProject/cvelistV5/tree/main/cves/2023/27xxx/CVE-2023-27581.json"},{"type":"ADVISORY","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":"FIX","url":"https://github.com/rlespinasse/github-slug-action/commit/102b1a064a9b145e56556e22b18b19c624538d94"},{"type":"PACKAGE","url":"https://github.com/rlespinasse/github-slug-action"},{"type":"WEB","url":"https://securitylab.github.com/research/github-actions-untrusted-input"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:37.694769961Z"}}