Vulnerability: An issue was discovered in FusionPBX up to 4.5.7. In the file app\conference_controls\conference_control_details.php, an unsanitized id variable coming from the URL is reflected in HTML on 2 occasions, leading to XSS.
Vulnerability ID: CVE-2019-16968
CWE: CWE-79
Severity score: 2.9
Project: https://github.com/fusionpbx/fusionpbx
Published: 2019-10-21
File: app/conference_controls/conference_control_details.php
Commit message: Update conference_control_details.php
Commit author: FusionPBX

Vulnerable version (before fix):
 	echo th_order_by('control_enabled', $text['label-control_enabled'], $order_by, $order); 	echo "<td class='list_control_icons'>"; 	if (permission_exists('conference_control_detail_add')) { 		echo "<a href='conference_control_detail_edit.php?conference_control_uuid=".$_GET['id']."' alt='".$text['button-add']."'>$v_link_label_add</a>"; 	} 	else { 		echo "&nbsp;\n"; 	echo "		<td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n"; 	echo "		<td class='list_control_icons'>"; 	if (permission_exists('conference_control_detail_add')) { 		echo 		"<a href='conference_control_detail_edit.php?conference_control_uuid=".$_GET['id']."' alt='".$text['button-add']."'>$v_link_label_add</a>"; 	} 	else { 		echo 		"&nbsp;";

Fixed version (after fix):
 	echo th_order_by('control_enabled', $text['label-control_enabled'], $order_by, $order); 	echo "<td class='list_control_icons'>"; 	if (permission_exists('conference_control_detail_add')) { 		echo "<a href='conference_control_detail_edit.php?conference_control_uuid=".escape($_GET['id'])."' alt='".$text['button-add']."'>$v_link_label_add</a>"; 	} 	else { 		echo "&nbsp;\n"; 	echo "		<td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n"; 	echo "		<td class='list_control_icons'>"; 	if (permission_exists('conference_control_detail_add')) { 		echo 		"<a href='conference_control_detail_edit.php?conference_control_uuid=".escape($_GET['id'])."' alt='".$text['button-add']."'>$v_link_label_add</a>"; 	} 	else { 		echo 		"&nbsp;";

Patch:
patch: @@ -92,7 +92,7 @@
 	echo th_order_by('control_enabled', $text['label-control_enabled'], $order_by, $order);
 	echo "<td class='list_control_icons'>";
 	if (permission_exists('conference_control_detail_add')) {
-		echo "<a href='conference_control_detail_edit.php?conference_control_uuid=".$_GET['id']."' alt='".$text['button-add']."'>$v_link_label_add</a>";
+		echo "<a href='conference_control_detail_edit.php?conference_control_uuid=".escape($_GET['id'])."' alt='".$text['button-add']."'>$v_link_label_add</a>";
 	}
 	else {
 		echo "&nbsp;\n";
@@ -132,7 +132,7 @@
 	echo "		<td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
 	echo "		<td class='list_control_icons'>";
 	if (permission_exists('conference_control_detail_add')) {
-		echo 		"<a href='conference_control_detail_edit.php?conference_control_uuid=".$_GET['id']."' alt='".$text['button-add']."'>$v_link_label_add</a>";
+		echo 		"<a href='conference_control_detail_edit.php?conference_control_uuid=".escape($_GET['id'])."' alt='".$text['button-add']."'>$v_link_label_add</a>";
 	}
 	else {
 		echo 		"&nbsp;";
path: app/conference_controls/conference_control_details.php