Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Share Post: Reddit Facebook

[-]
Tags
removes pypi code concerns mitmproxy2 execution

mrtroutPyPI removes 'mitmproxy2' over code execution concerns
#1
https://www.bleepingcomputer.com/news/se...-concerns/      PyPI removes 'mitmproxy2' over code execution concerns
By Ax Sharma
October 12, 2021 01:50 PM      The PyPI repository has removed a Python package called 'mitmproxy2' that was an identical copy of the official "mitmproxy" library, but with an "artificially introduced" code execution vulnerability.

The official 'mitmproxy' Python library is a free and open-source interactive HTTPS proxy with over 40,000 weekly downloads.

Copycat package could trick devs into falling for 'newer' version
Yesterday, Maximilian Hils, who is one of the developers behind the 'mitmproxy' Python library drew everyone's attention towards a counterfeit 'mitmproxy2' package uploaded to PyPI.

'mitmproxy2' is essentially "the same as regular mitmproxy but with an artificial RCE vulnerability included."


Hils' main concern, as he describes to BleepingComputer, was that some software developers might mistake 'mitmproxy2' as a newer version" of 'mitmproxy' and inadvertently introduce insecure code in their apps.

Hils found this copycat package in what he calls a "happy little accident" while looking into an unrelated PyPI warehouse issue.

mitmproxy2 pypi page
Now-removed 'mitmproxy2' PyPI package page (BleepingComputer)
On analyzing the differences between 'mitmproxy2' and his 'mitmproxy,' something important stood out. The former had all safeguards removed from the API:

"When you run mitmproxy's web interface, we expose an HTTP API for that. If you remove all safeguards from that API, everyone on the same network can execute code on your machine with a single HTTP request," Hils told BleepingComputer in an email interview.



It isn't clear either if the user who published the copycat 'mitmproxy2' package did so with willful malicious intent or just out of insecure coding practices.

"To be clear, this really isn't the most malicious thing an attacker could do. It would be much more straightforward to just add some malicious code that gets executed on install right away."

"The problem is of course if you upload that to PyPI as 'mitmproxy2' with a version number that indicates it's newer/a successor, people will inevitably download that not knowing about the changes."

Hils thanked PyPI volunteers for swiftly reacting to this report. Within four hours of Hils' tweet 'mitmproxy2' was taken down.

Whack-a-mole: another copycat appears hours later
While analyzing 'mitmproxy2', BleepingComputer discovered another package 'mitmproxy-iframe' had appeared on the PyPI registry, less than a day after 'mitmproxy2' was removed.

Once again, this package is an exact replica of the official mitmproxy, but with the aforementioned safeguards removed from the "app.py" file, as seen by BleepingComputer.

Interestingly, mitmproxy-iframe is also published by the same user who is behind 'mitmproxy2', now casting doubts on what the user's intentions are:

mitmproxy-iframe with same code execution vulnerability
Another package 'mitmproxy-iframe' appears with same code execution vulnerability (BleepingComputer)
Because anyone can publish packages to open-source ecosystems, security threats and attacks like malware injection, typosquatting, brandjacking, and dependency confusion have increased rapidly in recent times.

Unless concrete validations are put in place by open-source registries, these "whack-a-mole" situations are bound to repeat themselves.

BleepingComputer notified PyPI of the 'mitmproxy-iframe' package prior to publishing and the package was taken down.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  "git clone" Hit By Vulnerability That Could Lead To Code Execution Bjyda 0 407 03-11-2021 , 10:30 PM
Last Post: Bjyda
  Adobe Patches Code Execution Flaws in Connect, Creative Cloud, Framemaker Bjyda 0 443 03-10-2021 , 12:14 AM
Last Post: Bjyda
  VMware addresses Remote Code Execution issue in View Planner Bjyda 0 434 03-05-2021 , 12:16 AM
Last Post: Bjyda
  IBM Squashes Critical Remote Code-Execution Flaw Bjyda 0 291 02-24-2021 , 11:37 PM
Last Post: Bjyda
  Dependency confusion attack mounted via PyPi repo exposes flawed package installer be Bjyda 0 322 02-21-2021 , 10:12 PM
Last Post: Bjyda

Forum Jump:


Users browsing this thread: 1 Guest(s)