Skip to content
Open
Changes from all commits
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 @@ -17,6 +17,8 @@

//----------------------------------------------------------- user registration

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 via 'asdf' Parameter (Severity: HIGH)

Unvalidated input can lead to arbitrary code execution. The register.php script directly reflects the asdf GET parameter in the HTTP response on lines 20-21. This lack of output encoding allows an attacker to inject malicious HTML or JavaScript via a crafted URL, which can then be executed in the victim's browser, potentially leading to cookie theft or other malicious actions.

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


if (!$conf['allow_user_registration'])
{
page_forbidden('User registration closed');
Expand Down