CVE-2023-27581

Public Exploit
github-slug-action vulnerable to arbitrary code execution

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.

Category

8.8
CVSS
Severity: High
CVSS 3.1 •
EPSS 3.46% Top 15%
Vendor Advisory github.com
Affected: rlespinasse github-slug-action
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2023-27581?
CVE-2023-27581 has been scored as a high severity vulnerability.
How to fix CVE-2023-27581?
To fix CVE-2023-27581, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2023-27581 being actively exploited in the wild?
It is possible that CVE-2023-27581 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~3% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2023-27581?
CVE-2023-27581 affects rlespinasse github-slug-action.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.