Security: fixed EOF heredoc delimiter in action.yml enables step output injection
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in action.yml at lines 353-359 and trace how the Gemini response is written to GITHUB_OUTPUT. Check both the gemini_response and gemini_errors output channels, using the GitHub multiline-string guidance as reference. Done means a response containing a bare EOF line cannot terminate either output block early.
Written by the indexing model from the issue text.
Description
Summary
action.yml writes the Gemini CLI's LLM response to $GITHUB_OUTPUT using a fixed EOF heredoc delimiter (lines 353-359). If the LLM response contains a bare EOF line, the heredoc closes early and subsequent name=value lines become arbitrary step outputs.
This enables bash injection in any downstream consumer workflow that template-interpolates ${{ steps.gemini_run.outputs.X }} into a run: block.
Root Cause
echo "gemini_response<<EOF" >> "${GITHUB_OUTPUT}" # fixed delimiter
echo "${RESPONSE}" >> "${GITHUB_OUTPUT}" # attacker-influenced
echo "EOF" >> "${GITHUB_OUTPUT}" # fixed delimiter
Fix
Replace fixed EOF with a random per-invocation delimiter:
_DELIM="ghdelim_$(openssl rand -hex 16)"
echo "gemini_response<<${_DELIM}" >> "${GITHUB_OUTPUT}"
echo "${RESPONSE}" >> "${GITHUB_OUTPUT}"
echo "${_DELIM}" >> "${GITHUB_OUTPUT}"
This follows the canonical pattern from GitHub's official docs.
Impact
- Present since v0.1.12 (PR #247, 2025-08-25)
- Affects both
gemini_responseandgemini_errorsoutput channels - Zero authentication required (public issue triggers the flow)
- Distinct from GHSA-62f2-6rx8-v262 (TOML template fix) - same repo, different vulnerability
Related
- GHSA-62f2-6rx8-v262 (TOML
!{...}shell expansion - fixed in PR #524) - GHSA-wpqr-6v78-jr5g (trust-model hardening)
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 285
- Avg merge
- 8h 8m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google-github-actions/run-gemini-cli
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google-github-actions/run-gemini-cli#510 · 2 comments · 2 reactions ·
All issues in google-github-actions/run-gemini-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·