Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions register.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
define('PHPWG_ROOT_PATH','./');
include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );

echo $_GET['asdf'];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reflected XSS Vulnerability in register.php (Severity: MEDIUM)

This reflected XSS vulnerability allows an attacker to execute arbitrary JavaScript code in a user's browser, potentially leading to account compromise or data theft. The register.php script directly echoes the value of the asdf GET parameter on lines 13-14 without any sanitization, which causes any injected script code to be executed when the page is loaded. An attacker could craft a malicious link and trick a user into clicking it, resulting in the execution of the attacker's script in the user's browser within the context of the vulnerable web application.
View details

Suggested change
echo $_GET['asdf'];
echo htmlspecialchars((isset($_GET['asdf']) ? $_GET['asdf'] : ''), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');

// +-----------------------------------------------------------------------+
// | Check Access and exit when user status is not ok |
// +-----------------------------------------------------------------------+
Expand Down