Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CX Reflected_XSS_All_Clients @ modules/dayviewAJAX.php [master] #87

Open
cxronen opened this issue Sep 17, 2020 · 0 comments
Open

CX Reflected_XSS_All_Clients @ modules/dayviewAJAX.php [master] #87

cxronen opened this issue Sep 17, 2020 · 0 comments

Comments

@cxronen
Copy link
Owner

cxronen commented Sep 17, 2020

Reflected_XSS_All_Clients issue exists @ modules/dayviewAJAX.php in branch master

The application's <?php embeds untrusted data in the generated output with echo, at line 1 of modules\dayviewAJAX.php. This untrusted data is embedded straight into the output without proper sanitization or encoding, enabling an attacker to inject malicious code into the output.
The attacker would be able to alter the returned web page by simply providing modified data in the user input _POST, which is read by the <?php method at line 1 of modules\dayviewAJAX.php. This input then flows through the code straight to the output web page, without sanitization. 
This can enable a Reflected Cross-Site Scripting (XSS) attack.

Severity: High

CWE:79

Checkmarx

Lines: 186 44 221


Code (Line #186):

							if($isadministrator == "TRUE" || $_SESSION["username"] == (string)$reservation->username) $info .= "<strong>Time of Request</strong>: ". $reservation->timeofrequest ."<br/><br/><center>Cancel this reservation? <a href=\'javascript:cancel(". $reservation->id .",". $_POST["group"] .");\'>Yes</a> <a href=\'javascript:closePopUp();\'>No</a></center>";

Code (Line #44):

		$group_str .= "<td onClick=\"dayviewer('". $_POST["fromrange"] ."','". $_POST["torange"] ."','". $group["roomgroupid"] ."','');\" ". $selected_str .">". $group["roomgroupname"] ."</td>";

Code (Line #221):

				$collision = "<img style=\"cursor: pointer;\" src=\"". $_SESSION["themepath"] ."images/reservebutton.png\" border=\"0\" onClick=\"showPopUpReserve(this,'". $room->name ."','". $time_str ."','". $_POST["group"] ."','". $altusernamestr ."','". $room->id ."','". strtotime($currentmdy ." ". $current_time->getTime()) ."','". $capacity ."','". $durationhtml ."','". $capacity_string ."','". $optionalfields_string ."');\" />\n";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant