GHSL-2021-011: Command injection in itpp-labs workflows
The GitHub workflow in several itpp-labs repositories used the title of a newly opened issue directly in a shell command, allowing an attacker to inject arbitrary commands. This could lead to unauthorised modification of the base repository and exfiltration of secrets.
The DINAR-PORT.yml GitHub workflow in itpp-labs/misc-addons, itpp-labs/website-addons, itpp-labs/access-addons, itpp-labs/l10n-addons, itpp-labs/mail-addons, itpp-labs/pos-addons and itpp-labs/sync-addons repositories is vulnerable to arbitrary command injection.
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 commands in the workflow, leading to unauthorised modification of the base repository and exfiltration of secrets.
What the attacker needed
Ability to open an issue in the repository
The fix
The issue was resolved, likely by sanitising the issue title before using it in shell commands.
How it was found
- Create an issue with a title containing shell metacharacters and a command.
- The workflow triggers on the issue opening and runs the injected command.
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 being opened. Here, the workflow took the issue's title and put it straight into a command without checking it. An attacker could craft a title that includes extra commands, which the workflow would then run with its own permissions.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.