The vulnerability is a reflected Cross-Site Scripting (XSS) issue in the 'avo' gem, specifically concerning the return_to parameter. The root cause of the vulnerability was the improper handling of this parameter, which was passed through the application without adequate sanitization or encoding. The analysis of the patch commit 4453d39ddc6309f3bc8ada73ef21e1971112de7d reveals the core of the issue. The Avo::ApplicationHelper.d method, responsible for decrypting the return_to parameter, was designed to fail open. If decryption failed, it would return the original, untrusted input. An attacker could exploit this by crafting a URL with a malicious JavaScript payload in the return_to parameter. This payload would fail decryption and be passed along, eventually being rendered in an HTML view, such as app/components/avo/referrer_params_component.html.erb, leading to the execution of the script in the user's browser. The Avo::BaseApplicationController.decode_params method was the entry point for this tainted data. The fix involves changing the d method to return nil on decryption failure, effectively blocking the malicious payload. Additionally, the patch enforces encryption and Base64 encoding on the return_to parameter throughout the application to ensure its integrity.