actions-mkdocs: Command Injection via issue title in internal GitHub Actions workflowGHSA-6p2j-742g-835f
MEDIUMGHSA-6p2j-742g-835f is a medium-severity (CVSS 6.5) remote code execution vulnerability in Tiryoh/actions-mkdocs. A fix is available for Tiryoh/actions-mkdocs — see the affected versions and patch details below.
Real-World Exposure
Tiryoh/actions-mkdocsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects GitHub Actions packages — download data is not available via public APIs for these ecosystems.
Description
Summary
External input from github.event.issue.title is used unsafely in a shell command in .github/workflows/release-candidate.yaml, allowing command injection during workflow execution.
Details
In .github/workflows/release-candidate.yaml, the issue title is interpolated directly into a shell command:
export VERSION=$(echo ${{ github.event.issue.title }} | sed -E 's/Release v?([0-9\.]*)/\1/g')
Because the issue title is attacker-controlled and is embedded directly into a shell command, shell metacharacters such as command substitution ($()) and command separators (;) can be interpreted by the shell.
Although the workflow checks that the title starts with Release , this condition can still be satisfied by a maliciously crafted input.
PoC
-
Create or edit an issue with the following title:
Release v1.2.3 $(whoami) -
Trigger the workflow that processes the issue.
-
Observe that the injected command is executed on the runner.
The workflow logs show that $(whoami) is evaluated and its output (runner) appears in the command result, confirming that attacker-controlled input is executed within the shell.
Impact
This vulnerability allows command injection in the GitHub Actions runner through attacker-controlled issue titles. An attacker may be able to execute arbitrary commands within the context of the affected workflow job.
Depending on the workflow configuration (such as permissions and available secrets), successful exploitation could lead to:
- Unauthorized command execution in the CI environment
- Misuse of the
GITHUB_TOKEN - Modification of repository state, release artifacts, or other workflow outputs
If the repository is public and allows untrusted users to create or reopen issues that trigger the workflow, this may be exploitable by external users.
This issue is limited to the repository's internal workflow configuration and does not directly affect downstream users of the published actions-mkdocs GitHub Action.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦GitHub Actions | Tiryoh/actions-mkdocs | all versions | 0.25.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for Tiryoh/actions-mkdocs, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update Tiryoh/actions-mkdocs to 0.25.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-6p2j-742g-835f is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is GHSA-6p2j-742g-835f in your dependencies?
Find it across GitHub Actions, including transitive dependencies.