Skip to content
RCE Disclosed report Beginner

Dangling PIP Package Usage in github repository "github.com/mozilla-services/syncstorage-loadtest"

A Mozilla GitHub repository's requirements file references a Python package that is no longer available on PyPI. An attacker could register that package name and publish malicious code, potentially leading to remote code execution when the project is built.

Arshad Kazmi Follow

Originally disclosed on Mozilla

  • Fixed in 3 days
  • Paid in 9 days
  • Disclosed after 3 days

Summary

Mozilla have a github repository https://github.com/mozilla-services/syncstorage-loadtest In the repository there is a requirements.txt file which is using a pip package. The package is not available on pip store which makes it vulnerable to takeover.

Steps

  1. Go to https://github.com/mozilla-services/syncstorage-loadtest/blob/master/requirements.txt#L7
  2. You will see this package aiomeasures getting used at line 7.
  3. Try checking the package on pip repository using this url https://pypi.org/project/aiomeasures/
  4. You will see a 404 page, which means the package is not avaialble on the pip repository and can be taken over.

PoC

Impact

An attacker can takeover the package and host malicious code in it, which could cause RCE when the project will be build.

The original report as published on Mozilla's Bugzilla, by Arshad Kazmi. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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 take over the package and host malicious code in it, which could cause remote code execution when the project is built.

What the attacker needed

Access to the public GitHub repository; ability to register a package on PyPI

How it was found

  1. Open the requirements.txt file in the GitHub repository.
  2. Find the package named aiomeasures listed on line 7.
  3. Check the package on the PyPI website.
  4. Observe that the package page returns a 404 error, indicating it is not available.

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 a project lists software packages it needs, it downloads them from a public store. If a listed package has been removed from the store, anyone can claim that name and upload their own version. Then, when the project is built, it might download and run the attacker's code.

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 Arshad Kazmi

View all

4 more disclosed reports, best first.

More from Mozilla

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.