The vulnerability is a classic stored Cross-Site Scripting (XSS) issue within the Craft Commerce plugin. An attacker with permissions to manage store settings can inject malicious JavaScript into various text fields, such as the 'Name' field for shipping methods, shipping categories, tax categories, and more. The root cause is the failure to properly sanitize this user-provided input before it is rendered in the administrator's control panel. The provided patch addresses this by applying Html::encode() to the output in multiple controller actions responsible for displaying this data. When an administrator views a page containing the malicious payload (e.g., the shipping methods list), the script executes in their browser context. This can be leveraged for session hijacking, UI redressing, or, as demonstrated in the proof-of-concept, privilege escalation by forcing the administrator's browser to make an API call to grant the attacker's account administrative privileges.