# CVE-2023-27581: github-slug-action vulnerable to arbitrary code execution

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.58%, higher than 76% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-03-13T20:19:23.350Z
- Modified: 2026-09-10T03:49:52.759Z
- Also known as: GHSA-6q4m-7476-932w
- Weaknesses: CWE-77
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- rlespinasse github-slug-action: >= 4.0.0, < 4.4.1
- rlespinasse/github-slug-action (GitHub Actions): from 4.0.0 before 4.4.1
- github-slug-action_project github-slug-action: from 4.0.0 before 4.4.1

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://securitylab.github.com/research/github-actions-untrusted-input/> (exploit, third-party-advisory)
- <https://github.com/rlespinasse/github-slug-action/security/advisories/GHSA-6q4m-7476-932w> (vendor-advisory, web)
- <https://github.com/rlespinasse/github-slug-action/commit/102b1a064a9b145e56556e22b18b19c624538d94> (patch, web)
- <https://github.com/rlespinasse/github-slug-action/releases/tag/v4.4.1> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-27581> (advisory)
- <https://github.com/rlespinasse/github-slug-action> (package)
- <https://securitylab.github.com/research/github-actions-untrusted-input> (web)

## Sources

- CVE List: [CVE-2023-27581](https://www.cve.org/CVERecord?id=CVE-2023-27581), CVE Terms of Use, modified 2025-02-25
- GitHub Advisory Database: [GHSA-6q4m-7476-932w](https://github.com/advisories/GHSA-6q4m-7476-932w), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2023-27581](https://nvd.nist.gov/vuln/detail/CVE-2023-27581), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-27581 · Whole record: https://cve.day/CVE-2023-27581.json · Rebuilt by cve.day 2026-11-25T22:58:22.405Z
