How I Found a P1 Bug in a Bug Bounty Program (Step-by-Step Guide)
This article details the discovery of an XSS vulnerability due to insufficient input validation and lack of Content Security Policy (CSP). The application accepted user input for a query parameter without proper sanitization, allowing script injection through the 'query' field. By injecting a JavaScript payload containing document.cookie manipulation code, the researcher was able to set and persist a PHPSESSID cookie on the victim's device. This payload was executed by the browser, creating a persistent session cookie that allowed an attacker to maintain unauthorized sessions and gain access to other users' accounts without needing their login credentials. The vulnerability paid out $1,000, and the organization addressed it by implementing strong input validation and setting appropriate CSP headers—never trust user-controlled data for security decisions. Key lesson: Validate inputs and enforce strict Content Security Policies to prevent XSS attacks. #BugBounty #XSS #CSP #InputValidation #Infosec





