sherlock-project/sherlock GitHub Actions RCE via pull_request_target Injection (CVE-2026-44590)
A command injection vulnerability, identified as CVE-2026-44590, exists in the `validate_modified_targets.yml` GitHub Actions workflow of sherlock-project/sherlock. A malicious pull request can trigger arbitrary command execution in the privileged CI context, allowing attackers to exfiltrate the GITHUB_TOKEN and auto-approve the malicious PR without human interaction, effectively leading to a supply chain compromise.
CVE-2026-44590 is a critical command injection vulnerability found in the validate_modified_targets.yml GitHub Actions workflow of the sherlock-project/sherlock repository. Discovered and reported by Astaruf, this vulnerability allows any GitHub user to open a pull request that triggers arbitrary command execution within the privileged Continuous Integration (CI) environment. The vulnerability stems from the pull_request_target event, which, without proper input sanitization, permits the injection of malicious commands into the workflow. This exploit allows attackers to exfiltrate the GITHUB_TOKEN and automatically approve malicious pull requests, potentially leading to supply chain compromise without any human review. The proof-of-concept (PoC) automates the entire attack chain, highlighting the severity and ease of exploitation of this vulnerability.
Attack Chain
- Attacker forks the
sherlock-project/sherlockrepository. - Attacker creates a malicious branch with a crafted payload designed to inject commands into the
validate_modified_targets.ymlworkflow. - The attacker opens a pull request (PR) targeting the
masterbranch of their fork, triggering thepull_request_targetevent. - The GitHub Actions workflow executes the injected payload, which can include commands to exfiltrate sensitive information.
- The injected payload extracts the
GITHUB_TOKENfrom the workflow environment by readinggit config --list. - The stolen
GITHUB_TOKENis used to authenticate against the GitHub API. - The attacker uses the stolen token to automatically approve the malicious pull request via the GitHub API, specifically the
POST /repos/{owner}/{repo}/pulls/{pull_number}/reviewsendpoint. - The malicious PR is merged, resulting in a supply chain compromise.
Impact
Successful exploitation of CVE-2026-44590 can lead to a full supply chain compromise. An attacker could inject malicious code into the sherlock-project/sherlock repository (or forks thereof), potentially affecting all users of the software. The automated nature of the attack, involving token exfiltration and automatic PR approval, significantly increases the risk, reducing the need for manual interaction. The impact is substantial as it allows for code injection into the project’s codebase, potentially affecting all downstream users and dependencies.
Recommendation
- Monitor GitHub Actions workflow execution logs for unusual command invocations, particularly those involving
git config --list, using a webserver rule on productlinuxthat examines HTTP request headers. - Implement input validation and sanitization in GitHub Actions workflows, particularly when using the
pull_request_targettrigger, to prevent command injection as described in CVE-2026-44590. - Enforce strict branch protection rules and require code review by multiple trusted developers before merging any pull requests, even those approved by GitHub Actions.
- Deploy the Sigma rule
Detect Suspicious Sherlock GitHub Actions Workflow Activityto detect potential exploitation attempts by monitoring process creation events. - Review and audit existing GitHub Actions workflows for similar vulnerabilities and apply necessary security patches or mitigations.
Detection coverage 2
Detect Suspicious Sherlock GitHub Actions Workflow Activity
highDetects suspicious activity within Sherlock GitHub Actions workflows, specifically looking for command execution that attempts to exfiltrate secrets.
Detect OAST Callback from GitHub Actions Workflow
mediumDetects outbound network connections from GitHub Actions workflows to known OAST (Out-of-Band Application Security Testing) services.
Detection queries are available on the platform. Get full rules →
Indicators of compromise
5
url
| Type | Value |
|---|---|
| url | https://sploitus.com/exploit?id=B265A4A6-887B-55F2-A0B7-038269601502 |
| url | https://nstsec.com/en/posts/sherlock-rce-pull-request-target-cve-2026-44590/ |
| url | https://github.com/sherlock-project/sherlock/security/advisories |
| url | https://nvd.nist.gov/vuln/detail/CVE-2026-44590 |
| url | https://vulners.com/cve/CVE-2026-44590 |