PecanProject Pecan Cross-Site Scripting Vulnerability

Vulnerability

A cross-site scripting (XSS) vulnerability has been identified in PecanProject Pecan, affecting versions through 1.8.0. This vulnerability allows remote attackers to execute arbitrary code by injecting malicious payloads into the hostname, sitegroupid, lat, lon, and sitename parameters. The injected scripts are executed in the context of the user's browser, potentially leading to session hijacking by stealing cookies.

Impact

Exploitation of this vulnerability allows for reflected cross-site scripting, where injected scripts are executed immediately in the user's browser. This could be further exploited to steal cookies and session information.

Reproduction

To reproduce this vulnerability, send a request to the '03-inputs.php' file with a payload injected into the 'sitename' parameter. This can be done on a local server or the PecanProject demo site. The injected script will execute an alert, demonstrating the XSS vulnerability. For a more advanced exploitation, a payload can be crafted to fetch and exfiltrate cookie data to an external server.

Remediation

To mitigate this vulnerability, ensure that sensitive cookies are marked as HttpOnly, implement a Content Security Policy to restrict script sources, and sanitize user input while encoding output to prevent script execution.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
10.0
exploitability
5.8
remediation
0.0
relevance
0.0
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.