MaaAssistantArknights
- dev-v2
A vulnerability has been identified in the GitHub Actions workflow of MaaAssistantArknights, specifically in the release-preparation.yml file. This issue arises from the improper handling of pull request titles, which are injected into shell commands without proper sanitization. As a result, a non-draft pull request from a forked repository, titled 'Release v', could execute arbitrary shell commands on the GitHub Actions runner during the changelog generation job. The vulnerability affects the latest version of MaaAssistantArknights.
Exploitation of this vulnerability allows for arbitrary code execution on the GitHub Actions runner, with the executed commands running in the context of the repository.
To reproduce this vulnerability, fork the MaaAssistantArknights repository and open a non-draft pull request with a title that starts with 'Release v'. The title should include a command injection payload, such as one that uses command substitution to execute a command, like 'touch /tmp/pwned'. Once the pull request is opened, the 'generate-changelog' job will run and execute the injected command on the runner.
The vulnerability can be remediated by binding the pull request title via the 'env' directive and quoting it, preventing GitHub from re-parsing it as shell code. Additionally, a guard can be added to ensure the pull request is from the same repository.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.