Cross-site scripting (XSS) vulnerability in search.5.html in BloofoxCMS 0.3.5 allows remote attackers to inject arbitrary web script or HTML via the search parameter to index.php. NOTE: some of these details are obtained from third party information.
BloofoxCMS 0.3.5 is vulnerable to a cross-site scripting (XSS) attack, allowing attackers to inject malicious scripts into web pages viewed by other users. This vulnerability, exploitable through the search parameter, could lead to account compromise, data theft, or website defacement.
Step 1: Payload Delivery: The attacker crafts a malicious URL containing a JavaScript payload within the search parameter. The payload is designed to execute arbitrary code when the page is loaded by a victim.
Step 2: Request Submission: The attacker sends the crafted URL to a victim, typically through phishing, social engineering, or by embedding it on a compromised website.
Step 3: Server Processing: The victim's browser sends a request to the vulnerable BloofoxCMS instance, including the malicious search parameter.
Step 4: Vulnerable Code Execution: The index.php script, using search.5.html, retrieves the search parameter's value and includes it in the HTML response without proper sanitization.
Step 5: Malicious Code Execution: The victim's browser receives the HTML response, which now includes the attacker's JavaScript payload. The browser then executes the injected JavaScript code in the context of the BloofoxCMS website, allowing the attacker to perform actions on behalf of the victim.
The vulnerability stems from insufficient input validation and output encoding within the search.5.html template when handling the search parameter passed to index.php. The application fails to properly sanitize user-supplied input before displaying it on the page. This allows attackers to inject arbitrary HTML and JavaScript code, which is then executed by the victim's browser. The root cause is a lack of input validation and output encoding (e.g., escaping special characters like <, >, ", and ') on the search parameter's value before it's rendered in the HTML response. This allows the attacker to inject malicious JavaScript code that will be executed in the context of the victim's browser.