munkireport / munkireport-php

A reporting tool for munki
MIT License
392 stars 138 forks source link

Reflected cross site scripting in /report #1496

Open zwxxb opened 1 year ago

zwxxb commented 1 year ago

hello i noticed in the /report route that the passphrase variable is being reflected to the front page without , and that allow an attacker to execute arbitrary js

if (! in_array($_POST['passphrase'], $auth_list)) {
                $this->error('passphrase "'.$_POST['passphrase'].'" not accepted');
            }

a simple htmlspecialchars($_POST['passphrase']); could do the job i guess

Good day .