Closed
Bug 1443225
Opened 8 years ago
Closed 8 years ago
RCE @ arewefastyet
Categories
(Websites :: Other, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1443061
People
(Reporter: simonjohnathan, Unassigned)
Details
(Keywords: reporter-external, sec-high, wsec-injection)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36
Steps to reproduce:
Found another RCE.
The RCE start at file retrigger.php:
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
$machine_id = (int)$request->machine_id;
$mode_id = (int)$request->mode_id;
$revision = $request->revision;
$run_before_id = (int)$request->run_before_id;
$run_after_id = (int)$request->run_after_id;
$benchmarks = $request->benchmarks;
$retrigger = RetriggerController::fromMachine($machine_id, $mode_id);
$retrigger->convertToRevision($mode_id, $revision, $run_before_id, $run_after_id);
$retrigger->selectBenchmarks($benchmarks);
$retrigger->enqueueNow();
See the $revision param.
It goes to $retrigger->convertToRevision function.
@ lib/RetriggerController.php:->
public function convertToRevision($mode_id, $revision, $run_before_id, $run_after_id) {
$mode = new Mode($mode_id);
foreach ($this->tasks as $task) {
$task->update_modes(Array("jmim"/*$mode->mode()*/));
$task->setBuildRevision($revision);
$task->setSubmitterOutOfOrder("jmim"/*$mode->mode()*/, $revision, $run_before_id, $run_after_id);
}
}
The function pass it to $task->setSubmitterOutOfOrder
@lib/ManipulateTask.php
public function setSubmitterOutOfOrder($mode_name, $revision, $run_before_id, $run_after_id) {
$commands = BashInterpreter::matchCommand($this->task, "python submitter.py");
foreach ($commands as $command) {
if (count(BashInterpreter::matchFlag($command, "-c")) > 0 ||
count(BashInterpreter::matchFlag($command, "--create")) > 0)
{
$flag = "--revision ".$revision." ";
$flag .= "--mode ".$mode_name." ";
$flag .= "--run_before ".$run_before_id." ";
$flag .= "--run_after ".$run_after_id;
$this->task = BashInterpreter::addFlagToCommand($this->task, $command, $flag);
}
}
}
see the $revision on flag?, just add semicolon (;) and execute a new command :).
SORUCES @ https://github.com/mozilla/arewefastyet
arewefastyet - 63.245.208.0/20 0 (arewefastyet.com) - 63.245.223.14.
This is part of mozilla's CORE subnet. (arewefastyet.firefox.local)
Actual results:
RCE
Expected results:
Should not execute RCE
Comment 1•8 years ago
|
||
Making a note here that we need some sort of proof of concept demonstration of this for us to confirm this bug. ATM the affected site is down for maintenance.
Updated•8 years ago
|
Group: websites-security
Updated•8 years ago
|
Flags: needinfo?(bbouvier)
Updated•8 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(bbouvier)
Resolution: --- → DUPLICATE
Updated•8 years ago
|
Flags: sec-bounty?
Updated•8 years ago
|
Flags: sec-bounty? → sec-bounty+
Comment 3•8 years ago
|
||
This bug was already discovered by our team and reported in bug 1443061, but because we believe we wouldn't have found this bug without being prompted in the pursuit of confirming bug 1442963, we've decided to award a bounty anyways.
Thanks Johnathan for bringing this to our attention!
Updated•4 years ago
|
Keywords: sec-high,
wsec-injection
Updated•4 years ago
|
Group: websites-security
Updated•2 years ago
|
Keywords: reporter-external
You need to log in
before you can comment on or make changes to this bug.
Description
•