Page MenuHomePhabricator

Toolforge tool "mwstew" vulnerable to PHPUnit remote code execution
Closed, ResolvedPublic

Description

$ curl --data "<?php echo(pi());" "https://tools.wmflabs.org/mwstew/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php"
3.1415926535898

This is CVE-2017-9841 / http://phpunit.vulnbusters.com/

I deleted the problematic file for now (tools.mwstew@tools-bastion-03:~/public_html$ rm vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php), but PHPUnit needs to be upgraded to the latest 4.x release to avoid the issue in the future. Also it would be good to not install dev dependencies with composer install --no-dev.

I noticed this with my new Toolforge vulnerability checker.

Event Timeline

Legoktm triaged this task as High priority.Sep 16 2018, 1:43 AM
Legoktm added a project: Toolforge.
Legoktm updated the task description. (Show Details)
Legoktm added a subscriber: Mooeypoo.

Eek, thank you. I'm generally reworking this tool but it is taking me quite a while since it's done on the side... I'll need to make sure I'm not updating composer on dev, though.

I checked and phpunit has been removed from mwstew tool.

Legoktm changed the visibility from "Custom Policy" to "Public (No Login Required)".Jul 28 2021, 12:29 AM