CVE-2023-27581: Arbitrary Code Execution in github-slug-action

Summary

13/03/2023
Yes i
High
8.8

CVE-2023-27581: github-slug-action vulnerable to arbitrary code execution. Affects rlespinasse/github-slug-action versions >= 4.0.0, < 4.4.1. Fixed in 4.4.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

github-slug-action is a GitHub Actions package that allows users to generate a unique slug for pull requests and branches. It is commonly used in CI/CD pipelines to automate workflows. This package is vulnerable to an arbitrary code execution vulnerability that can be triggered by any user on GitHub when using the action on pull requests. The vulnerability arises from the insecure usage of the github.head_ref parameter. Attackers can exploit this vulnerability by creating a pull request with a specially crafted branch name containing malicious code. This can lead to code execution on GitHub runners, potential resource wastage through crypto-mining, and the exfiltration of secrets used in the CI pipeline.

Vulnerability Detail

The vulnerability in github-slug-action allows any user on GitHub to execute arbitrary code on the GitHub runners by manipulating the github.head_ref parameter. This can have severe consequences, including unauthorized code execution, resource abuse, and the potential exposure of sensitive information. The vulnerability can be exploited by creating a pull request with a malicious branch name. The impact is not limited to a specific workflow or repository, making it a critical security concern for users of github-slug-action.

How To Fix

Minimum fixed version

4.4.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If you are impacted by this vulnerability, there is no available workaround. It is crucial to upgrade to the patched version of github-slug-action to address the issue.

Conclusion

The arbitrary code execution vulnerability in github-slug-action poses a significant security risk to users of this package. It is crucial to upgrade to the patched version to prevent unauthorized code execution, resource abuse, and potential exposure of sensitive information. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for rlespinasse/github-slug-action →

Share this vulnerability

FAQ

The vulnerability can be exploited by creating a pull request with a branch name containing malicious code. When the pull request is processed, the malicious code can be executed on the GitHub runners.

The consequences of this vulnerability include unauthorized code execution on GitHub runners, potential resource wastage through crypto-mining, and the possibility of sensitive information being exfiltrated from the CI pipeline.

Yes, any workflow using github-slug-action on pull requests is potentially affected by this vulnerability. It is important to upgrade to the patched version to mitigate the risk.

No, the vulnerability requires the attacker to create a pull request with a specially crafted branch name. Without a pull request, the vulnerability cannot be triggered.

First-time pull requests will not be executed, but an attacker can submit a valid pull request before submitting an invalid one to exploit the vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for rlespinasse/github-slug-action.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

4.4.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback