Cross-site Scripting (XSS) refers to client-side code injection attack wherein an attacker can execute malicious scripts into a legitimate website or web application. XSS occurs when a web application makes use of unvalidated or unencoded user input within the output it generates.
The user input GET parameter oldsql
of upgrade.php is unsanitized resulting reflected cross site scripting.
Apply context-dependent encoding and/or validation to user input rendered on a page