GHSL-2020-210: Template injection in the GitHub workflow of hyperspacedev/starlight repository
A GitHub workflow used issue titles and bodies as inputs to a Jira action that internally expanded double-curly-brace expressions, allowing an attacker to run arbitrary code on the GitHub runner and exfiltrate the Jira API token.
Automatic GitHub workflow in hyperspacedev/starlight repository is vulnerable to template injection from user comments.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could execute arbitrary code on the GitHub runner and exfiltrate the secret Jira API token.
What the attacker needed
Ability to create an issue in the repository
The fix
The vendor fixed the issue the day after the report.
How it was found
- Create an issue with a body containing a double-curly-brace expression that runs a command.
- The workflow passes the issue body to the Jira Create issue action.
- The action evaluates the expression, executing the command on the runner.
- The command exfiltrates the Jira API token to an attacker-controlled server.
- Optionally edit the issue to a benign message and close it to reduce visibility.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A GitHub workflow is an automated script that runs when something happens, like a new issue. This workflow passed the issue text into a third-party action that secretly evaluated anything inside double curly braces as code. So a user could write a special issue body that made the workflow run their commands and steal a secret token.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.