The vulnerability is a classic Stored Cross-Site Scripting (XSS) issue. The root cause is twofold: failure to sanitize user input and failure to encode output. The Methods::create() and Methods::update() functions in modules/Methods/Controllers/Methods.php are the entry points for the vulnerability, as they accept user-controlled data (e.g., 'pagename', 'description') and store it in the database without proper sanitization. The patch evidence clearly shows the addition of esc(strip_tags(trim())) to these inputs, which confirms the vulnerability. The second part of the vulnerability lies in the rendering of this stored data. The menu() function in app/Common.php and the nestable() helper in modules/Backend/Helpers/ci4ms_helper.php were responsible for displaying the method titles in the navigation menus. Before the patch, they rendered the title directly to the page, allowing the stored malicious script to execute. The patch applies the esc() function to the output, which neutralizes the script by converting HTML special characters to their entity equivalents. Therefore, all four functions are critical to understanding and exploiting this vulnerability.