GHSL-2020-177: Template injection in the GitHub workflows of codacy-plint repository
GitHub workflows in the codacy-pylint repository passed user-controlled issue titles and bodies to Atlassian Jira actions, which internally expanded double-curly-brace expressions. An attacker could create an issue with a crafted title or body to execute arbitrary code on the GitHub runner and exfiltrate the Jira API token.
Automatic GitHub workflows in codacy-pylint repository are 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 or comment
How it was found
- Create an issue with a title and body containing a double-curly-brace expression.
- The workflow passes the issue title and body to the Atlassian Jira action.
- The action evaluates the expression, executing code on the GitHub runner.
- The code exfiltrates the Jira API token to an attacker-controlled server.
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.
When you open an issue on GitHub, the title and body you write are just text. But in this case, those text fields were fed into a tool that treats certain patterns like {{...}} as code to run. So an attacker could write a special issue that made the tool run commands on the server, stealing a secret password.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.