Skip to content
Advisory Advanced CVE-2024-47179

GHSL-2024-178: Possible full repository takeover for RSSHub through Artifact Poisoning - CVE-2024-47179

The docker-test-cont.yml workflow downloads an artifact from a triggering workflow without validating its contents, allowing a malicious pull request to include a package.json with a preinstall script. When the workflow runs pnpm i, the script executes with full write privileges, potentially enabling a full repository takeover.

Alvaro Muñoz Follow

Originally disclosed on GitHub Security Lab

RSSHub’s docker-test-cont.yml workflow is vulnerable to Artifact Poisoning which may lead to a full repository takeover.

pwntester, 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

Root cause

The workflow failed to validate the contents of the downloaded artifact before extracting it and running package installation, allowing a malicious package.json to be included and executed.

What the attacker needed

Ability to create a pull request; Pull request body contains a routes markdown block

How it was found

  1. Clone the repository.
  2. Modify the docker-test.yml workflow to add a step that creates a payload directory with the Docker image and a malicious package.json containing a preinstall script.
  3. Create a pull request with a valid routes comment in the body.
  4. Observe the vulnerable workflow log for the output of the preinstall script.

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 Actions workflow is an automated script that runs when something happens, like a pull request. Here, a workflow downloaded a file bundle (artifact) from another workflow without checking what was inside. An attacker could sneak in a file that runs their own commands when the workflow installed dependencies, giving them control over the repository.

More by Alvaro Muñoz

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.