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 comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
include_once(PHPWG_ROOT_PATH.'include/functions_comment.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 comments.php via 'asdf' Parameter (Severity: MEDIUM)

This reflected XSS vulnerability allows an attacker to execute arbitrary JavaScript code in a user's browser, potentially leading to session hijacking or defacement. The vulnerability exists in comments.php at line 16, where the value of the 'asdf' parameter from the $_GET array is directly echoed into the HTML output without proper sanitization, which causes any injected script code to be executed.
View details in ZeroPath

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

Choose a reason for hiding this comment

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

Reflected XSS vulnerability in comments.php via 'asdf' parameter (Severity: MEDIUM)

This reflected cross-site scripting (XSS) vulnerability allows an attacker to execute arbitrary JavaScript code in a victim's browser, potentially leading to account compromise or data theft. The comments.php script directly echoes the asdf GET parameter on line 16 without any sanitization or escaping, which causes any provided JavaScript code to be executed when a user visits the crafted URL.
View details

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


if (!$conf['activate_comments'])
{
page_not_found(null);
Expand Down