GHSL-2020-185: Arbitrary code execution in Plugins Verified by Homebridge workflow
The GitHub workflow that verifies Homebridge plugins installs npm packages from user-supplied issue comments, which can execute arbitrary code. An attacker could use the temporary GitHub token available to the workflow to modify the repository or run malicious code.
The ‘plugin-prechecks.yml’ GitHub workflow is vulnerable to arbitrary code execution, that may lead to the repository being compromised.
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 in the GitHub action runner and use the temporary repository token to modify the repository content or run malicious code in the hosted environment.
What the attacker needed
Public issue or comment with /check; malicious npm package
The fix
The issue was fixed by the vendor.
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 automatically runs when someone comments '/check' on an issue. It takes a link to an npm package from the comment and installs it. Installing an npm package can run scripts, so an attacker can make the workflow run their code and steal a token that allows changing the repository.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.