GHSL-2020-173: Undocumented template expression evaluation in the gajira-comment GitHub action - CVE-2020-14189
The gajira-comment GitHub action evaluates the comment input as a lodash template, allowing an attacker who can post a comment to execute arbitrary JavaScript in the GitHub runner. This could exfiltrate the Jira API token stored in the runner's home directory.
The gajira-comment GitHub action isupports undocumented template syntax that may lead to arbitrary code execution.
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
Root cause
The action uses lodash's template function on untrusted user input without sanitisation, so any text between double braces is executed as JavaScript.
Impact
An attacker could execute arbitrary code in the GitHub runner and exfiltrate the Jira API token, though the attack requires the victim to use the action with a comment containing template syntax.
What the attacker needed
Victim uses gajira-comment action; attacker can post a comment; comment contains template syntax
The fix
The issue was fixed in version 2.0.2.
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 action is a small program that runs automatically when something happens on GitHub, like a new comment. This action took the text of a comment and treated it as a template, which meant it could run code hidden inside the comment. An attacker could post a comment that made the action send secret login details to the attacker's server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.