Skip to content
RCE Advisory Intermediate

GHSL-2020-179: Template injection in the GitHub workflows of codacy-coverage-reporter-action repository

GitHub workflows in the codacy-coverage-reporter-action repository passed issue titles, bodies, and comments into 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.

jarlob Follow

Originally disclosed on GitHub Security Lab

Automatic GitHub workflows in codacy-coverage-reporter-action repository are vulnerable to template injection from user comments.

jarlob, on GitHub Security Lab

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

What the attacker needed

Ability to create an issue or comment

The fix

The issue was fixed by the vendor.

How it was found

  1. Create an issue with a title and body containing a double-curly-brace expression.
  2. The workflow passes the issue title and body to the Atlassian Jira action.
  3. The action evaluates the expression, executing arbitrary code on the GitHub runner.
  4. 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 write a GitHub Actions workflow, you can insert data from issues or comments into the workflow using special syntax. Here, that data was passed to a third-party action that also evaluates anything inside double curly braces. So a user could put code inside those braces in an issue, and it would run on the server that runs the workflow, letting the attacker steal secrets.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by jarlob

View all

192 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.